1name: "Build docs"
2description: "Build the docs"
3
4runs:
5 using: "composite"
6 steps:
7 - name: Setup mdBook
8 uses: peaceiris/actions-mdbook@ee69d230fe19748b7abf22df32acaa93833fad08 # v2
9 with:
10 mdbook-version: "0.4.37"
11
12 - name: Cache dependencies
13 uses: swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
14 with:
15 save-if: ${{ github.ref == 'refs/heads/main' }}
16 # cache-provider: "buildjet"
17
18 - name: Install Linux dependencies
19 shell: bash -euxo pipefail {0}
20 run: ./script/linux
21
22 - name: Check for broken links (in MD)
23 uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 # v2.4.1
24 with:
25 args: --no-progress --exclude '^http' './docs/src/**/*'
26 fail: true
27
28 - name: Build book
29 shell: bash -euxo pipefail {0}
30 run: |
31 mkdir -p target/deploy
32 mdbook build ./docs --dest-dir=../target/deploy/docs/
33
34 - name: Check for broken links (in HTML)
35 uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 # v2.4.1
36 with:
37 args: --no-progress --exclude '^http' 'target/deploy/docs/'
38 fail: true