From cb55e14e3e4961acdac2f0b27d9b769ef87b773c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Sat, 31 May 2025 12:53:05 -0400 Subject: [PATCH] ENH: Add link checker GHA workflow file Add link checker GHA workflow file: use the `lychee` action to check for broken links in Markdown, HTML, reStructuredText, and other files. Repository: https://github.com/lycheeverse/lychee-action Documentation: https://lychee.cli.rs/introduction/ --- .github/workflows/linkcheck.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 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 00000000000..b2dc7e60594 --- /dev/null +++ b/.github/workflows/linkcheck.yml @@ -0,0 +1,25 @@ +name: Check links + +on: [push, pull_request] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + linkcheck: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Restore lychee cache + uses: actions/cache@v4 + with: + path: .lycheecache + key: cache-lychee-${{ github.sha }} + restore-keys: cache-lychee- + - name: Run lychee + uses: lycheeverse/lychee-action@v2 + with: + args: "--base . --cache --max-cache-age 1d ." + fail: true