File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Deploy docs
22
33on :
44 push :
5- branches : [' gh-pages' ]
5+ branches : [gh-pages]
66 workflow_dispatch :
77
88permissions :
@@ -11,34 +11,42 @@ permissions:
1111 id-token : write
1212
1313concurrency :
14- group : ' pages'
14+ group : pages
1515 cancel-in-progress : false
1616
1717jobs :
18- deploy :
19- environment :
20- name : github-pages
21- url : ${{ steps.deployment.outputs.page_url }}
18+ build :
2219 runs-on : ubuntu-latest
2320 steps :
2421 - name : Checkout
25- uses : actions/checkout@v3
22+ uses : actions/checkout@v4
23+ with :
24+ fetch-depth : 0
25+ - uses : pnpm/action-setup@v3
26+ - name : Setup Node
27+ uses : actions/setup-node@v4
2628 with :
27- ref : gh-pages
29+ node-version : 20
30+ cache : pnpm
2831 - name : Setup Pages
29- uses : actions/configure-pages@v3
30- - name : Install deps
31- run : npm i
32- - name : Built docs
33- run : npm run docs:build
34- - name : Move dist to "www/"
35- run : mv .vitepress/dist/* .
32+ uses : actions/configure-pages@v4
33+ - name : Install dependencies
34+ run : pnpm i
35+ - name : Build with VitePress
36+ run : pnpm docs:build
3637 - name : Upload artifact
3738 uses : actions/upload-pages-artifact@v3
3839 with :
39- path : ' .'
40- - name : Wait for 10s
41- run : sleep 10
40+ path : docs/.vitepress/dist
41+
42+ deploy :
43+ environment :
44+ name : github-pages
45+ url : ${{ steps.deployment.outputs.page_url }}
46+ needs : build
47+ runs-on : ubuntu-latest
48+ name : Deploy
49+ steps :
4250 - name : Deploy to GitHub Pages
4351 id : deployment
4452 uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 11# MrServer Website
22
33Our official website source code, built with Vitepress.
4- Hosted on Github Pages.
5-
6- thanks to [ google/zx] ( https://github.com/google/zx ) for the Github Action.
4+ Hosted on Github Pages.
75
86## License
97
You can’t perform that action at this time.
0 commit comments