1- # Sample workflow for building and deploying a VitePress site to GitHub Pages
2- #
3- name : Deploy VitePress site to Pages
1+ name : Deploy docs 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 :
9- branches : [1.21-rework]
10-
11- # Allows you to run this workflow manually from the Actions tab
5+ branches :
6+ - main
7+ - 1.21-rework
128 workflow_dispatch :
139
14- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1510permissions :
1611 contents : read
1712 pages : write
1813 id-token : write
1914
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.
2215concurrency :
23- group : pages
24- cancel-in-progress : false
16+ group : " pages"
17+ cancel-in-progress : true
2518
2619jobs :
27- # Build job
2820 build :
2921 runs-on : ubuntu-latest
3022 steps :
3123 - name : Checkout
32- uses : actions/checkout@v5
33- with :
34- fetch-depth : 0 # Not needed if lastUpdated is not enabled
35- # - uses: pnpm/action-setup@v4 # Uncomment this block if you're using pnpm
36- # with:
37- # version: 9 # Not needed if you've set "packageManager" in package.json
38- # - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
39- - name : Setup Node
40- uses : actions/setup-node@v6
24+ uses : actions/checkout@v4
25+
26+ - name : Setup Node.js
27+ uses : actions/setup-node@v4
4128 with :
42- node-version : 24
43- cache : npm # or pnpm / yarn
44- - name : Setup Pages
45- uses : actions/configure-pages@v4
29+ node-version : 20
30+ cache : ' npm'
31+
4632 - name : Install dependencies
47- run : npm ci # or pnpm install / yarn install / bun install
48- - name : Build with VitePress
49- run : npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
50- - name : Check the files structure
51- run : tree
33+ run : npm ci
34+
35+ - name : Build VitePress site
36+ run : npm run docs:build
37+
38+ - name : Setup Pages
39+ uses : actions/configure-pages@v5
5240
5341 - name : Upload artifact
5442 uses : actions/upload-pages-artifact@v3
5543 with :
5644 path : docs/.vitepress/dist
5745
58- # Deployment job
5946 deploy :
6047 environment :
6148 name : github-pages
6249 url : ${{ steps.deployment.outputs.page_url }}
63- needs : build
6450 runs-on : ubuntu-latest
65- name : Deploy
51+ needs : build
6652 steps :
6753 - name : Deploy to GitHub Pages
6854 id : deployment
69- uses : actions/deploy-pages@v4
55+ uses : actions/deploy-pages@v4
56+
0 commit comments