forked from informalsystems/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (57 loc) · 1.47 KB
/
guide.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Hermes Guide
on:
push:
branches:
- master
tags:
- v[0-9]+.*
pull_request:
paths:
- guide/**
jobs:
guide:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: cache .cargo directory
uses: actions/cache@v1
with:
path: ~/.cargo
key: cargo-dir
restore-keys: |
cargo-dir
- name: Install mdbook
uses: actions-rs/[email protected]
with:
crate: mdbook
version: latest
use-tool-cache: true
- name: Install mdbook-mermaid
uses: actions-rs/[email protected]
with:
crate: mdbook-mermaid
version: latest
use-tool-cache: true
- name: Install mdbook-template
uses: actions-rs/[email protected]
with:
crate: mdbook-template
version: latest
use-tool-cache: true
- name: Install mdbook-toc
uses: actions-rs/[email protected]
with:
crate: mdbook-toc
version: latest
use-tool-cache: true
- name: Build guide
run: |
cd guide
mdbook build
# Only deploy guide when releasing a new version of Hermes
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./guide/book