From 4250385ae1bc1c29bf88d16510a144fac4a5a076 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Tue, 5 Dec 2023 10:32:10 +1100 Subject: [PATCH] Fix stuck linkcheck on CI (#4977) * Fix linkcheck CI job timeouts. Use linkcheck 3.0.0 without Docker. * Add sleep to wait for the mdbook server to start serving --- .github/workflows/linkcheck.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 19236691f..7f5d3e0b6 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -22,14 +22,15 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - 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:v0.4.20-rust serve --hostname 0.0.0.0 + run: | + docker run -v ${{ github.workspace }}/book:/book --name book -p 3000:3000 -d peaceiris/mdbook:latest serve --hostname 0.0.0.0 + sleep 5 - name: Print logs run: docker logs book - name: Run linkcheck - run: docker run --network book tennox/linkcheck:latest book:3000 + run: | + curl -sL https://github.com/filiph/linkcheck/releases/download/3.0.0/linkcheck-3.0.0-linux-x64.tar.gz | tar xvzf - linkcheck/linkcheck --strip 1 + ./linkcheck localhost:3000 -d