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

Commit 28d3de4

Browse files
committed
add deploy workflow
1 parent 553fbb3 commit 28d3de4

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/deploy-docs.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
24+
25+
- name: 设置 Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 22
29+
cache: npm
30+
31+
- name: 安装依赖
32+
run: |
33+
corepack enable
34+
npm ci
35+
36+
- name: 构建文档
37+
env:
38+
NODE_OPTIONS: --max_old_space_size=8192
39+
run: |-
40+
npm run docs:build
41+
> src/.vuepress/dist/.nojekyll
42+
43+
- name: 部署文档
44+
uses: JamesIves/github-pages-deploy-action@v4
45+
with:
46+
# 部署文档
47+
branch: gh-pages
48+
folder: src/.vuepress/dist
49+

0 commit comments

Comments
 (0)