-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (39 loc) · 1010 Bytes
/
build.yml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
name: build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Page Build
runs-on: ubuntu-latest
steps:
- name: 检查分支
uses: actions/checkout@v2
- name: 安装Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: 安装Node
uses: actions/setup-node@v2
with:
node-version: '12'
check-latest: true
- name: 安装Node依赖
run: npm install .
- name: 安装Mkdocs
run: pip install mkdocs-material
- name: 安装mkdocs-statistics-plugin
run: pip install -e .
- name: 构建页面
run: mkdocs build -v
- name: 发放到Github Page
if: ${{ github.event_name == 'push' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
force_orphan: true