File tree Expand file tree Collapse file tree 1 file changed +39
-29
lines changed Expand file tree Collapse file tree 1 file changed +39
-29
lines changed Original file line number Diff line number Diff line change 1- name : Deploy Documentation
1+ name : Deploy Documentation to Pages
22
33on :
4- push :
5- branches :
6- - main
7- paths :
8- - docs/**
9- - README.md
4+ # push:
5+ # branches: [main]
106 workflow_dispatch :
117
8+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
129permissions :
13- contents : write
10+ contents : read
1411 pages : write
1512 id-token : write
1613
14+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
1716concurrency :
18- group : " pages"
17+ group : pages
1918 cancel-in-progress : false
2019
2120jobs :
22- deploy :
21+ # Build job
22+ build :
2323 runs-on : ubuntu-latest
2424 steps :
25- - uses : actions/checkout@v4
25+ - name : Checkout
26+ uses : actions/checkout@v4
2627 with :
27- fetch-depth : 0
28-
29- - uses : actions/setup-node@v4
30- with :
31- registry-url : https://registry.npmjs.org/
32- node-version : latest
33-
34- - uses : pnpm/action-setup@v4
35- name : Install pnpm
36- id : pnpm-install
28+ fetch-depth : 0
29+ - name : Setup pnpm
30+ uses : pnpm/action-setup@v4
3731 with :
3832 version : 10
39-
33+ - name : Setup Node
34+ uses : actions/setup-node@v4
35+ with :
36+ node-version : latest
37+ cache : pnpm
38+ - name : Setup Pages
39+ uses : actions/configure-pages@v4
4040 - name : Install dependencies
4141 run : pnpm install
42-
43- - name : Build
42+ - name : Build with VitePress
4443 run : pnpm build
45-
46- - name : Deploy
47- uses : peaceiris/actions-gh-pages@v3
44+ - name : Upload artifact
45+ uses : actions/upload-pages-artifact@v3
4846 with :
49- github_token : ${{ secrets.GITHUB_TOKEN }}
50- publish_dir : docs/.vitepress/dist
47+ path : docs/.vitepress/dist
48+
49+ # Deployment job
50+ deploy :
51+ environment :
52+ name : github-pages
53+ url : ${{ steps.deployment.outputs.page_url }}
54+ needs : build
55+ runs-on : ubuntu-latest
56+ name : Deploy
57+ steps :
58+ - name : Deploy to GitHub Pages
59+ id : deployment
60+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments