action.yml

 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: Build book
23      shell: bash -euxo pipefail {0}
24      run: |
25        mkdir -p target/deploy
26        mdbook build ./docs --dest-dir=../target/deploy/docs/