File tree Expand file tree Collapse file tree 2 files changed +49
-2
lines changed
Expand file tree Collapse file tree 2 files changed +49
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy VitePress to GitHub Pages
2+
3+ on :
4+ push :
5+ branches : [main]
6+ workflow_dispatch :
7+
8+ permissions :
9+ contents : read
10+ pages : write
11+ id-token : write
12+
13+ jobs :
14+ build-and-deploy :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 0
21+
22+ - name : Setup pnpm
23+ uses : pnpm/action-setup@v4
24+
25+ - name : Setup Node.js
26+ uses : actions/setup-node@v4
27+ with :
28+ node-version : 20
29+ cache : ' pnpm'
30+
31+ - name : Install dependencies
32+ run : pnpm install
33+
34+ - name : Build
35+ run : pnpm run docs:build
36+
37+ - name : Setup GitHub Pages
38+ uses : actions/configure-pages@v5
39+
40+ - name : Upload artifact
41+ uses : actions/upload-pages-artifact@v3
42+ with :
43+ path : docs/.vitepress/dist
44+
45+ - name : Deploy to GitHub Pages
46+ id : deployment
47+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 99 "clean" : " rimraf dist docs/.vitepress/dist" ,
1010 "build:theme" : " rollup -c" ,
1111 "docs:dev" : " vitepress dev docs" ,
12- "docs:build" : " vitepress build docs" ,
12+ "docs:build" : " pnpm run build:theme && vitepress build docs" ,
1313 "docs:preview" : " vitepress preview docs" ,
1414 "build" : " pnpm run clean && pnpm run build:theme && pnpm run docs:build"
1515 },
2323 "packageManager" : " pnpm@10.20.0" ,
2424 "devDependencies" : {
2525 "postcss" : " ^8.5.6" ,
26- "rimraf" : " ^5.0 .0" ,
26+ "rimraf" : " ^6.1 .0" ,
2727 "rollup" : " ^4.53.2" ,
2828 "rollup-plugin-postcss" : " ^4.0.2" ,
2929 "sass" : " ^1.94.0" ,
You can’t perform that action at this time.
0 commit comments