File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Deploy site to GitHub Pages
1+ name : Deploy slides to GitHub Pages
22
33on :
44 push :
55 branches : [main, master]
66 paths :
7- - site/**
87 - slides/**
9- - README.md
108 - .github/workflows/pages.yml
119 workflow_dispatch :
1210
3432 with :
3533 node-version : 22
3634 cache : pnpm
37- cache-dependency-path : |
38- slides/pnpm-lock.yaml
39- site/pnpm-lock.yaml
35+ cache-dependency-path : slides/pnpm-lock.yaml
4036
4137 - uses : actions/configure-pages@v5
4238
@@ -52,23 +48,19 @@ jobs:
5248 echo "prefix=/$repo" >> "$GITHUB_OUTPUT"
5349 fi
5450
55- - name : Install slides dependencies
51+ - name : Install
5652 working-directory : slides
5753 run : pnpm install --frozen-lockfile
5854
59- - name : Install site dependencies
60- working-directory : site
61- run : pnpm install --frozen-lockfile
62-
63- - name : Build site
55+ - name : Build
6456 env :
6557 SITE_BASE : ${{ steps.base.outputs.prefix }}
66- working-directory : site
67- run : pnpm run build:with-slides
58+ working-directory : slides
59+ run : pnpm run build
6860
6961 - uses : actions/upload-pages-artifact@v3
7062 with :
71- path : site /dist
63+ path : slides /dist
7264
7365 deploy :
7466 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 88 "sync:content" : " node ./scripts/sync-content.mjs" ,
99 "predev" : " pnpm run sync:content" ,
1010 "build" : " pnpm run sync:content && astro build" ,
11- "build:with-slides" : " pnpm --dir ../slides run build && pnpm run build" ,
11+ "build:with-slides" : " SLIDES_MOUNT=/slides pnpm --dir ../slides run build && pnpm run build" ,
1212 "preview" : " astro preview --host 0.0.0.0 --port 4321"
1313 },
1414 "dependencies" : {
Original file line number Diff line number Diff line change 55 "packageManager" : " pnpm@10.22.0" ,
66 "scripts" : {
77 "dev" : " tsx scripts/picker.ts dev --open" ,
8- "build" : " rimraf dist && pnpm -r run build" ,
8+ "build" : " rimraf dist && pnpm -r run build && tsx scripts/index.ts " ,
99 "metadata" : " tsx scripts/metadata.ts" ,
1010 "typecheck" : " pnpm -r run typecheck" ,
1111 "update:redirects" : " tsx scripts/redirects.ts" ,
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ const normalizePrefix = (prefix: string) => {
2929}
3030
3131const base = normalizeBase ( baseInput )
32- const slidesMount = normalizePrefix ( process . env . SLIDES_MOUNT || '/slides ' )
32+ const slidesMount = normalizePrefix ( process . env . SLIDES_MOUNT || '' )
3333const urlBase = `${ normalizePrefix ( process . env . SITE_BASE || '' ) } ${ slidesMount } ${ base } `
3434
3535const cwd = process . cwd ( )
You can’t perform that action at this time.
0 commit comments