Skip to content

Commit 6d1ae77

Browse files
committed
ci: update github action
1 parent 3457af2 commit 6d1ae77

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

Diff for: .github/workflows/gh-pages.yml

+13-5
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,23 @@ on:
77

88
jobs:
99
deploy:
10-
runs-on: ubuntu-18.04
10+
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- run: npm install
14-
# 文档编译命令,如果是 react 模板需要修改为 npm run docs:build
15-
- run: npm run docs:build
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
with:
15+
# 如果配置 themeConfig.lastUpdated 为 false,则不需要添加该参数以加快检出速度
16+
fetch-depth: 0
17+
- name: Install dependencies
18+
run: npm install
19+
- name: Build with dumi
20+
# 文档编译命令,如果是 react 模板需要修改为 npm run docs:build
21+
run: npm run docs:build
1622
- name: Deploy
1723
uses: peaceiris/actions-gh-pages@v3
1824
with:
1925
github_token: ${{ secrets.ACCESS_TOKEN }}
26+
user_name: ${{ secrets.MY_USER_NAME }}
27+
user_email: ${{ secrets.MY_USER_EMAIL }}
2028
# 文档目录,如果是 react 模板需要修改为 docs-dist
2129
publish_dir: ./docs-dist

0 commit comments

Comments
 (0)