-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.43 KB
/
notes.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: mdbook-build
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.34'
- name: Setup Graphviz
run: |
wget 'https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/10.0.1/ubuntu_22.04_graphviz-10.0.1-debs.tar.xz'
tar xvf ubuntu_22.04_graphviz-10.0.1-debs.tar.xz
sudo apt-get install -y fonts-liberation ./graphviz_10.0.1-1_amd64.deb ./libgraphviz4_10.0.1-1_amd64.deb
- name: Download the katex preprocessor
run: |
wget 'https://github.com/lzanini/mdbook-katex/releases/download/v0.5.7/mdbook-katex-v0.5.7-x86_64-unknown-linux-gnu.tar.gz'
tar xvf mdbook-katex-v0.5.7-x86_64-unknown-linux-gnu.tar.gz
mv -v mdbook-katex ~/.cargo/bin
- name: Build the dot preprocessor
run: |
cargo build --manifest-path deps/mdbook-dot/Cargo.toml
cp deps/mdbook-dot/target/debug/mdbook-dot ~/.cargo/bin
- name: Build the book files
run: mdbook build
- name: Deploy to the GitHub Pages branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{secrets.GITHUB_TOKEN}}
publish_dir: ./book
publish_branch: book