Skip to content

Commit 397cf05

Browse files
committed
Skip lunaria plugin on CI, since it tries to clone the repo in all workflows
1 parent 4d7d34b commit 397cf05

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

astro.config.mjs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { ogImagesIntegration } from "./src/integrations/ogImages";
2323
import { SUPPORTED_LANGUAGES, SITE_TITLES } from "./src/config/i18n.mjs";
2424
import { firebaseIntegration } from "./src/integrations/firebase";
2525
import { remarkClientOnly } from "./src/plugins";
26+
import { filterBoolean } from "./src/utils/filterBoolean";
2627
// import { isMoveReferenceEnabled } from "./src/utils/isMoveReferenceEnabled";
2728
// import { rehypeAddDebug } from "./src/plugins";
2829

@@ -101,16 +102,18 @@ export default defineConfig({
101102
PageTitle: "./src/starlight-overrides/PageTitle.astro",
102103
Sidebar: "./src/starlight-overrides/Sidebar.astro",
103104
},
104-
plugins: [
105+
plugins: filterBoolean([
105106
starlightLlmsTxt({
106107
promote: ["index*", "get-started"],
107108
demote: ["404"],
108109
exclude: ["404"],
109110
}),
110-
lunaria({
111-
sync: true,
112-
route: "/i18n-status",
113-
}),
111+
// Skip lunaria plugin on CI, since it tries to clone the repo in all workflows
112+
!process.env.GITHUB_RUN_ID &&
113+
lunaria({
114+
sync: true,
115+
route: "/i18n-status",
116+
}),
114117
...(hasAlgoliaConfig
115118
? [
116119
starlightDocSearch({
@@ -136,7 +139,7 @@ export default defineConfig({
136139
),
137140
]
138141
: []),
139-
],
142+
]),
140143
sidebar,
141144
customCss: ["./src/globals.css", "katex/dist/katex.min.css"],
142145
}),

src/utils/filterBoolean.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export const filterBoolean = <T>(arr: T[]) =>
2+
arr.filter(Boolean) as Exclude<T, false | null | undefined | 0 | "">[];

0 commit comments

Comments
 (0)