-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (33 loc) · 1.06 KB
/
Copy pathgh-pages.yml
File metadata and controls
35 lines (33 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: github pages
on:
push:
branches:
- main # default branch
workflow_dispatch: # 允许手动触发
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# 如果配置 themeConfig.lastUpdated 为 false,则不需要添加该参数以加快检出速度
fetch-depth: 0
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Build with dumi
# 文档编译命令,如果是 react 模板需要修改为 npm run docs:build
run: pnpm run docs:build
# - name: Deploy
# uses: peaceiris/actions-gh-pages@v3.7.3
# with:
# deploy_key: ${{ secrets.HG_PAGES_GITHUB_TOKEN }}
# # 文档目录,如果是 react 模板需要修改为 docs-dist
# publish_dir: ./docs-dist
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs-dist