Skip to content

Commit 35eee03

Browse files
committed
fix: configure Astro site/base and add Pages setup for GitHub Pages deployment
Astro needs site and base config to generate correct asset paths when hosted at a subpath (google.github.io/scion). Also adds the recommended configure-pages workflow step.
1 parent 25e3680 commit 35eee03

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ jobs:
4949
cache: 'npm'
5050
cache-dependency-path: docs-site/package-lock.json
5151

52+
- name: Setup Pages
53+
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
54+
uses: actions/configure-pages@v5
55+
5256
- name: Install D2
5357
run: curl -fsSL https://d2lang.com/install.sh | sh -s --
5458

docs-site/astro.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import d2 from 'astro-d2';
2121

2222
// https://astro.build/config
2323
export default defineConfig({
24+
site: 'https://google.github.io',
25+
base: '/scion',
2426
integrations: [
2527
d2(),
2628
starlight({

0 commit comments

Comments
 (0)