-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.06 KB
/
mdbook-pages.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
49
name: Mdbook Pages
on:
push:
branches: dev
pull_request:
branches: dev
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install mdbook
uses: actions-rs/[email protected]
with:
crate: mdbook
version: latest
use-tool-cache: true
- name: Build mdbook
run: mdbook build
- name: Cache artifact
uses: actions/upload-artifact@v1
with:
name: book
path: ./book
deploy:
if: github.event_name == 'push'
needs: build
runs-on: ubuntu-latest
steps:
- name: Get artifact
uses: actions/download-artifact@v1
with:
name: book
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./book
publish_branch: master
allow_empty_commit: true
user_name: "huangjj27"
user_email: "[email protected]"
force_orphan: true