Skip to content

Commit 9288b37

Browse files
committed
chore: restore classic slides homepage deployment
1 parent 571f476 commit 9288b37

4 files changed

Lines changed: 10 additions & 18 deletions

File tree

.github/workflows/pages.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
name: Deploy site to GitHub Pages
1+
name: Deploy slides to GitHub Pages
22

33
on:
44
push:
55
branches: [main, master]
66
paths:
7-
- site/**
87
- slides/**
9-
- README.md
108
- .github/workflows/pages.yml
119
workflow_dispatch:
1210

@@ -34,9 +32,7 @@ jobs:
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

site/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
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": {

slides/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
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",

slides/scripts/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const normalizePrefix = (prefix: string) => {
2929
}
3030

3131
const base = normalizeBase(baseInput)
32-
const slidesMount = normalizePrefix(process.env.SLIDES_MOUNT || '/slides')
32+
const slidesMount = normalizePrefix(process.env.SLIDES_MOUNT || '')
3333
const urlBase = `${normalizePrefix(process.env.SITE_BASE || '')}${slidesMount}${base}`
3434

3535
const cwd = process.cwd()

0 commit comments

Comments
 (0)