Skip to content

Commit debd785

Browse files
committed
chore: migrate to node 24 and pnpm 11 for docs site
1 parent bb16e3d commit debd785

3 files changed

Lines changed: 26 additions & 9 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,31 @@ jobs:
1111
name: Deploy to GitHub Pages
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
15-
- uses: pnpm/action-setup@v2
14+
- name: Checkout
15+
uses: actions/checkout@v6
1616
with:
17-
version: 9.14.2
17+
persist-credentials: false
18+
- uses: pnpm/action-setup@v6
19+
with:
20+
cache: true
21+
package_json_file: site/package.json
22+
cache_dependency_path: site/pnpm-lock.yaml
1823
- uses: actions/setup-node@v4
1924
with:
20-
node-version: 20.
21-
cache: 'pnpm'
22-
cache-dependency-path: site/pnpm-lock.yaml
25+
node-version: 24
2326

2427
- name: Build website
2528
working-directory: site
2629
run: |
2730
pnpm install --frozen-lockfile
2831
pnpm run build
32+
33+
- name: Commit changes
34+
id: extract_repo_name
35+
run: |
36+
# Extract only the repo name from 'owner/repo-name'
37+
echo "repo_name=$(echo "${{ github.repository }}" | cut -d'/' -f2)" >> "$GITHUB_OUTPUT"
38+
2939
# Popular action to deploy to GitHub Pages:
3040
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
3141
- name: Deploy to GitHub Pages
@@ -34,5 +44,5 @@ jobs:
3444
github_token: ${{ secrets.GITHUB_TOKEN }}
3545
# Build output to publish to the `gh-pages` branch:
3646
publish_dir: ./docs
37-
user_name: Mikkel Schmidt
38-
user_email: mikkel.schmidt@gmail.com
47+
user_name: ${{ steps.extract_repo_name.outputs.repo_name }}
48+
user_email: actions@github.com

site/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,6 @@
6969
"last 1 firefox version",
7070
"last 1 safari version"
7171
]
72-
}
72+
},
73+
"packageManager": "pnpm@11.2.2+sha512.36e6621fad506178936455e70247b8808ef4ec25797a9f437a93281a020484e2607f6a469a22e982987c3dbb8866e3071514ab10a4a1749e06edcd1ec118436f"
7374
}

site/pnpm-workspace.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
allowBuilds:
2+
'@swc/core': true
3+
'@tsparticles/engine': true
4+
core-js: true
5+
core-js-pure: true
6+
sharp: true

0 commit comments

Comments
 (0)