-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (45 loc) · 1.42 KB
/
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
45
46
47
48
49
50
51
52
name: Book
on:
push:
branches-ignore:
- "gh-pages"
paths:
- "book/**"
- ".github/workflows/book.yml"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
generate:
name: Generate HTML with MdBook
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Cache Cargo Dependencies
uses: actions/cache@v2
env:
cache-name: cache-cargo-dependencies
# disable cache four daily builds
if: ${{ github.event_name != 'schedule' }}
with:
# cargo cache files are stored in `~/.cargo` on Linux/macOS
# source for paths: https://doc.rust-lang.org/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Graphviz
run: |
echo "$GITHUB_REF"
sudo apt-get update
sudo apt-get install -y graphviz
- name: Install mdbook and Dependencies
run: |
cargo install mdbook --locked || true
cargo install mdbook-linkcheck --locked || true
cargo install --git https://github.com/dylanowen/mdbook-graphviz || true
- name: Generate Book as Html
run: mdbook build book