1- # Sample workflow for building and deploying a VitePress site to GitHub Pages
2- #
3- name : Deploy VitePress site to Pages
1+ name : Deploy to Github Pages
42
53on :
6- # Runs on pushes targeting the `main` branch. Change this to `master` if you're
7- # using the `master` branch as the default branch.
84 push :
95 branches : [main]
106
11- # Allows you to run this workflow manually from the Actions tab
127 workflow_dispatch :
138
14- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
159permissions :
1610 contents : read
1711 pages : write
1812 id-token : write
1913
20- # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21- # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2214concurrency :
2315 group : pages
2416 cancel-in-progress : false
2517
2618jobs :
27- # Build job
2819 build :
2920 runs-on : ubuntu-latest
3021 steps :
3122 - name : Checkout
32- uses : actions/checkout@v3
23+ uses : actions/checkout@v4
3324 with :
34- fetch-depth : 0 # Not needed if lastUpdated is not enabled
35- # - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm
25+ fetch-depth : 0
26+ - uses : pnpm/action-setup@v3
27+ with :
28+ version : 9
3629 - name : Setup Node
37- uses : actions/setup-node@v3
30+ uses : actions/setup-node@v4
3831 with :
39- node-version : 18
40- cache : yarn # or pnpm / npm
32+ node-version : 20
33+ cache : pnpm
4134 - name : Setup Pages
42- uses : actions/configure-pages@v3
35+ uses : actions/configure-pages@v4
4336 - name : Install dependencies
44- run : yarn install # or pnpm install / npm ci
37+ run : pnpm install
4538 - name : Build with VitePress
46- run : yarn docs:build # or pnpm docs:build / npm run docs:build
39+ run : pnpm docs:build
4740 - name : Upload artifact
48- uses : actions/upload-pages-artifact@v2
41+ uses : actions/upload-pages-artifact@v3
4942 with :
5043 path : docs/.vitepress/dist
5144
52- # Deployment job
5345 deploy :
5446 environment :
5547 name : github-pages
6052 steps :
6153 - name : Deploy to GitHub Pages
6254 id : deployment
63- uses : actions/deploy-pages@v2
55+ uses : actions/deploy-pages@v4
0 commit comments