-
Notifications
You must be signed in to change notification settings - Fork 44
44 lines (37 loc) · 935 Bytes
/
book.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
name: Build and deploy spr documentation
concurrency:
group: gh-pages
on:
push:
branches:
- master
paths:
- "book.toml"
- "docs/**"
jobs:
mdbook:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache mdbook
id: cache-mdbook
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/mdbook
~/.cargo/bin/mdbook-mermaid
key: ${{ runner.os }}-mdbook
- name: Install mdBook
if: steps.cache-mdbook.outputs.cache-hit != 'true'
run: cargo install mdbook mdbook-mermaid
- name: Run mdBook
run: |
mdbook-mermaid install
mdbook build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book
publish_branch: gh-pages