Skip to content

Commit d0db7f9

Browse files
committed
ci(astro.config): update site URL and base path for CI environment
- Set site URL to localhost for local development and GitHub Pages URL for CI - Use different base paths for release and staging environments - Add conditional logic based on process.env.CI and process.env.GITHUB_EVENT_NAME
1 parent 3bc84b8 commit d0db7f9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

astro.config.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ import starlight from '@astrojs/starlight';
44

55
// https://astro.build/config
66
export default defineConfig({
7-
site: 'https://flutter-news-app-full-source-code.github.io',
8-
base: '/docs',
7+
site: process.env.CI
8+
? 'https://flutter-news-app-full-source-code.github.io'
9+
: 'http://localhost:4321',
10+
base: process.env.CI ? (process.env.GITHUB_EVENT_NAME === 'release' ? '/docs' : '/docs-staging') : '/',
911
integrations: [
1012
starlight({
1113
title: 'Flutter News App Toolkit',

0 commit comments

Comments
 (0)