Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit eedbe69

Browse files
committed
add deploy workflow
1 parent 553fbb3 commit eedbe69

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/deploy-docs.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
2+
name: 部署文档
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
deploy-gh-pages:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
# 如果你文档需要 Git 子模块,取消注释下一行
21+
# submodules: true
22+
23+
- name: 设置 pnpm
24+
uses: pnpm/action-setup@v4
25+
26+
27+
- name: 设置 Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: 22
31+
cache: pnpm
32+
33+
- name: 安装依赖
34+
run: |
35+
corepack enable
36+
pnpm install --frozen-lockfile
37+
38+
- name: 构建文档
39+
env:
40+
NODE_OPTIONS: --max_old_space_size=8192
41+
run: |-
42+
pnpm run docs:build
43+
> src/.vuepress/dist/.nojekyll
44+
45+
- name: 部署文档
46+
uses: JamesIves/github-pages-deploy-action@v4
47+
with:
48+
# 部署文档
49+
branch: gh-pages
50+
folder: src/.vuepress/dist

0 commit comments

Comments
 (0)