File tree Expand file tree Collapse file tree 3 files changed +492
-10
lines changed
Expand file tree Collapse file tree 3 files changed +492
-10
lines changed Original file line number Diff line number Diff line change 66
77 workflow_dispatch :
88
9- # 设置 GITHUB_TOKEN 的权限,以允许部署到 GitHub Pages
109permissions :
1110 contents : read
1211 pages : write
1312 id-token : write
1413
15- # 只允许同时进行一次部署,跳过正在运行和最新队列之间的运行队列
16- # 但是,不要取消正在进行的运行,因为我们希望允许这些生产部署完成
1714concurrency :
1815 group : pages
1916 cancel-in-progress : false
@@ -24,23 +21,39 @@ jobs:
2421 steps :
2522 - name : Checkout
2623 uses : actions/checkout@v4
27- with :
28- fetch-depth : 0
24+
2925 - name : Setup Node
3026 uses : actions/setup-node@v4
3127 with :
32- node-version : latest
3328 node-version-file : package.json
29+ check-latest : true
30+
3431 - name : Setup yarn
3532 run : |
3633 corepack enable
3734 yarn set version stable
35+
3836 - name : Setup Pages
3937 uses : actions/configure-pages@v5
38+
39+ - name : Get yarn cachedir
40+ id : yarn-cachedir
41+ run : echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
42+
43+ - name : Cache yarn
44+ uses : actions/cache@v4
45+ with :
46+ path : ${{ steps.yarn-cachedir.outputs.dir }}
47+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
48+ restore-keys : |
49+ ${{ runner.os }}-yarn-
50+
4051 - name : Install dependencies
4152 run : yarn install
53+
4254 - name : Build with VitePress
4355 run : yarn run docs:build
56+
4457 - name : Upload artifact
4558 uses : actions/upload-pages-artifact@v3
4659 with :
Original file line number Diff line number Diff line change 77 "node" : " >=22"
88 },
99 "devDependencies" : {
10- "prettier" : " 3.4.2" ,
11- "vitepress" : " ^1.3.4"
10+ "prettier" : " 3.4.2"
1211 },
1312 "scripts" : {
1413 "docs:dev" : " vitepress dev docs" ,
1514 "docs:build" : " vitepress build docs" ,
1615 "docs:preview" : " vitepress preview docs"
1716 },
1817 "dependencies" : {
19- "markdown-it-mathjax3" : " ^4.3.2"
18+ "markdown-it-mathjax3" : " ^4.3.2" ,
19+ "vitepress" : " ^1.3.4" ,
20+ "vitepress-plugin-mermaid" : " ^2.0.17"
2021 },
2122 "packageManager" : " yarn@4.5.0"
2223}
You can’t perform that action at this time.
0 commit comments