Skip to content

Commit ff8e895

Browse files
committed
test
1 parent bc70f83 commit ff8e895

File tree

3 files changed

+492
-10
lines changed

3 files changed

+492
-10
lines changed

.github/workflows/deploy.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@ on:
66

77
workflow_dispatch:
88

9-
# 设置 GITHUB_TOKEN 的权限,以允许部署到 GitHub Pages
109
permissions:
1110
contents: read
1211
pages: write
1312
id-token: write
1413

15-
# 只允许同时进行一次部署,跳过正在运行和最新队列之间的运行队列
16-
# 但是,不要取消正在进行的运行,因为我们希望允许这些生产部署完成
1714
concurrency:
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:

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@
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
}

0 commit comments

Comments
 (0)