From 8eeba4dcc8f12ac17ac51af1d1cc8bd94c7d130d Mon Sep 17 00:00:00 2001 From: Alexey Shekhirin Date: Tue, 20 Jun 2023 15:02:43 +0100 Subject: [PATCH] chore(ci): book lint (#3266) --- .github/workflows/book.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index 3c89bafdb..684acb8e9 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -29,6 +29,24 @@ jobs: - name: Run tests run: mdbook test + lint: + runs-on: ubuntu-latest + name: lint + + steps: + - uses: actions/checkout@v3 + + - name: Install mdbook-linkcheck + run: | + mkdir mdbook-linkcheck + curl -sSL -o mdbook-linkcheck.zip https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/latest/download/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip + unzip mdbook-linkcheck.zip -d ./mdbook-linkcheck + chmod +x `pwd`/mdbook-linkcheck/mdbook-linkcheck + echo `pwd`/mdbook-linkcheck >> $GITHUB_PATH + + - name: Run linkcheck + run: mdbook-linkcheck --standalone + build: runs-on: ubuntu-latest steps: @@ -91,7 +109,7 @@ jobs: # Only deploy if a push to main if: github.ref_name == 'main' && github.event_name == 'push' runs-on: ubuntu-latest - needs: [test, build] + needs: [test, lint, build] # Grant GITHUB_TOKEN the permissions required to make a Pages deployment permissions: