-
Notifications
You must be signed in to change notification settings - Fork 6
47 lines (41 loc) · 1.31 KB
/
doc.yaml
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
name: doc
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
push:
branches:
- "trunk"
workflow_dispatch:
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
CLICOLOR: 1
MDBOOK_VERSION: 0.4.37
LINKCHECK_VERSION: 0.7.7
jobs:
build_documentation:
name: Build documentation
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- name: Install mdbook
run: |
mkdir -p "$HOME/.cargo/bin"
curl -sSL "https://github.com/rust-lang/mdBook/releases/download/v$MDBOOK_VERSION/mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz" | tar -xvz --directory "$HOME/.cargo/bin"
- name: Install mdbook-linkcheck
run: |
curl -sSL "https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v$LINKCHECK_VERSION/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip" -o mdbook-linkcheck.zip
unzip mdbook-linkcheck.zip -d "$HOME/.cargo/bin"
chmod a+x "$HOME/.cargo/bin/mdbook-linkcheck"
- name: Add linkcheck configuration
run: |
echo -e "[output.linkcheck]\nfollow-web-links=true" >> doc/book.toml
cat doc/book.toml
- name: Build documentation
run: mdbook build doc
env:
RUST_LOG: "mdbook=info,linkcheck=warn,reqwest=debug"