Skip to content

Commit 555373e

Browse files
psd-codermoonclavedev
authored andcommitted
Skip lunaria plugin on CI, since it tries to clone the repo in all workflows
1 parent c56151a commit 555373e

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
@@ -24,6 +24,7 @@ import { SUPPORTED_LANGUAGES, SITE_TITLES } from "./src/config/i18n.mjs";
2424
import { firebaseIntegration } from "./src/integrations/firebase";
2525
import { remarkClientOnly } from "./src/plugins";
2626
import { devServerFileWatcher } from "./src/integrations/dev-server-file-watcher";
27+
import { filterBoolean } from "./src/utils/filterBoolean";
2728
// import { isMoveReferenceEnabled } from "./src/utils/isMoveReferenceEnabled";
2829
// import { rehypeAddDebug } from "./src/plugins";
2930

@@ -112,16 +113,18 @@ export default defineConfig({
112113
PageTitle: "./src/starlight-overrides/PageTitle.astro",
113114
Sidebar: "./src/starlight-overrides/Sidebar.astro",
114115
},
115-
plugins: [
116+
plugins: filterBoolean([
116117
starlightLlmsTxt({
117118
promote: ["index*", "get-started"],
118119
demote: ["404"],
119120
exclude: ["404"],
120121
}),
121-
lunaria({
122-
sync: true,
123-
route: "/i18n-status",
124-
}),
122+
// Skip lunaria plugin on CI, since it tries to clone the repo in all workflows
123+
!process.env.GITHUB_RUN_ID &&
124+
lunaria({
125+
sync: true,
126+
route: "/i18n-status",
127+
}),
125128
...(hasAlgoliaConfig
126129
? [
127130
starlightDocSearch({
@@ -147,7 +150,7 @@ export default defineConfig({
147150
),
148151
]
149152
: []),
150-
],
153+
]),
151154
sidebar,
152155
customCss: ["./src/globals.css", "katex/dist/katex.min.css"],
153156
}),

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)