From a8ae9c84189e3098d138da14391ec04c766f00b2 Mon Sep 17 00:00:00 2001 From: Akihito Nakano Date: Thu, 20 Jan 2022 09:14:23 +0000 Subject: [PATCH] Add linkcheck workflow (#2918) ## Issue Addressed Resolves #2889 ## Additional Info I have checked that the `linkcheck` workflow runs and detects broken links as expected, in https://github.com/ackintosh/lighthouse/pull/1. --- .github/workflows/linkcheck.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/linkcheck.yml diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml new file mode 100644 index 000000000..c23ee8df3 --- /dev/null +++ b/.github/workflows/linkcheck.yml @@ -0,0 +1,30 @@ +name: linkcheck + +on: + push: + branches: + - unstable + pull_request: + paths: + - 'book/**' + +jobs: + linkcheck: + name: Check broken links + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Create docker network + run: docker network create book + + - name: Run mdbook server + run: docker run -v ${{ github.workspace }}/book:/book --network book --name book -p 3000:3000 -d peaceiris/mdbook:latest serve --hostname 0.0.0.0 + + - name: Print logs + run: docker logs book + + - name: Run linkcheck + run: docker run --network book tennox/linkcheck:latest book:3000