summaryrefslogtreecommitdiffstats
path: root/.github/workflows/doc-check.yml
blob: c679eb12841df650fe8d0709a9d414c62dda122f (plain)
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
name: Documentation check

on:
  workflow_dispatch:
  pull_request:
    branches: [ main, 'release-*' ]
    paths:
      # Any files in the /docs directory at the root of the repository.
      - 'docs/**'

jobs:
  mdbook-build-check:
    name: Run mdbook build
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Setup mdBook
        uses: peaceiris/actions-mdbook@v1
        # https://github.com/marketplace/actions/mdbook-action
        with:
          mdbook-version: "0.4.18"
          # mdbook-version: 'latest'

      - name: Install mdbook-toc
        uses: actions-rs/install@v0.1
        # https://github.com/marketplace/actions/rust-cargo-install
        with:
          crate: mdbook-toc
          version: latest

      - name: Install mdbook-mermaid
        uses: actions-rs/install@v0.1
        # https://github.com/marketplace/actions/rust-cargo-install
        with:
          crate: mdbook-mermaid
          version: latest

      - name: Install mdbook-linkcheck
        uses: actions-rs/install@v0.1
        # https://github.com/marketplace/actions/rust-cargo-install
        with:
          crate: mdbook-linkcheck
          version: latest

      - name: Run mdbook build
        run: |
          ls -l
          cd docs
          mdbook build