Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.

Commit 9d36d2f

Browse files
committed
修改构建
1 parent bba4bd5 commit 9d36d2f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

.github/workflows/build-wiki.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,18 @@ jobs:
2121
node-version: '10' # 选择 Node.js 版本
2222

2323
- name: Install GitBook
24-
run: npm install -g gitbook-cli # 安装 gitbook-cli
24+
run: npm install -g gitbook-cli && gitbook fetch # 安装 gitbook-cli
2525

2626
- name: Build GitBook
27-
run: gitbook fetch && gitbook install && gitbook build # 构建 GitBook 静态文件
27+
run: gitbook install && gitbook build # 构建 GitBook 静态文件
2828

2929
- name: Deploy to Main Branch
3030
run: |
3131
git config --global user.email "github-actions[bot]@users.noreply.github.com"
3232
git config --global user.name "github-actions[bot]"
3333
3434
# 创建一个新分支,如果已存在则切换到该分支
35-
git checkout main || git checkout -b main
36-
37-
# 确保 source/wiki 目录存在
38-
mkdir -p source/wiki
35+
git checkout -b main
3936
4037
# 清除 source/wiki 目录内容
4138
rm -rf source/wiki/*

0 commit comments

Comments
 (0)