From ee0d32d3de89d7289c03f272d7f6fbe067b1a2fe Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 9 May 2021 19:50:39 +0200 Subject: [PATCH] CI: Ensure that usage string is always up to date --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36d1f55..160d9ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,3 +67,27 @@ jobs: with: command: fmt args: --all -- --check + + docs: + name: build docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: '0.4.4' + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + - name: Ensure that docs can be built + run: cd docs && mdbook build + - name: Generate usage string + run: cargo run -- --help > docs/src/usage-actual.txt + - name: Ensure that usage string is up to date + run: diff docs/src/usage{,-actual}.txt