File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed
Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Docs (GitHub Pages)
2+
3+ on :
4+ push :
5+ branches : ["main"]
6+ workflow_dispatch : {}
7+
8+ permissions :
9+ contents : write
10+
11+ concurrency :
12+ group : docs-${{ github.ref }}
13+ cancel-in-progress : true
14+
15+ jobs :
16+ deploy :
17+ runs-on : ubuntu-latest
18+ steps :
19+ - uses : actions/checkout@v4
20+
21+ - name : Setup Node
22+ uses : actions/setup-node@v4
23+ with :
24+ node-version : " 18"
25+ cache : npm
26+ cache-dependency-path : docs/package-lock.json
27+
28+ - name : Install
29+ working-directory : docs
30+ run : npm ci
31+
32+ - name : Build
33+ working-directory : docs
34+ run : npm run build
35+
36+ - name : Deploy
37+ uses : peaceiris/actions-gh-pages@v4
38+ with :
39+ github_token : ${{ secrets.GITHUB_TOKEN }}
40+ publish_branch : gh-pages
41+ publish_dir : docs/.vuepress/dist
42+ enable_jekyll : false
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ module.exports = {
22 lang : 'zh-CN' ,
33 title : 'Clasp' ,
44 description : 'C++17 的 Cobra-like 命令行框架(兼容行为优先)' ,
5+ // GitHub Pages project site base (https://<user>.github.io/<repo>/)
6+ base : '/clasp/' ,
57
68 themeConfig : {
79 repo : 'cuihairu/clasp' ,
@@ -30,4 +32,3 @@ module.exports = {
3032 } ,
3133 } ,
3234}
33-
You can’t perform that action at this time.
0 commit comments