From 5da589b22fac170b9939e3551e6530e6fbe7018e Mon Sep 17 00:00:00 2001 From: Philippe Charles Date: Tue, 14 Nov 2023 08:22:59 +0100 Subject: [PATCH] Add check links workflow --- .github/workflows/check-links.yml | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/check-links.yml diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml new file mode 100644 index 00000000..a0a1a37e --- /dev/null +++ b/.github/workflows/check-links.yml @@ -0,0 +1,40 @@ +name: Check links in documentation + +on: + push: + paths: + - '.github/workflows/check-links.yml' + - 'lychee.toml' + - '**/*.md' + schedule: + # Run on the first of each month at 9:00 AM + - cron: "0 9 1 * *" + workflow_dispatch: + +concurrency: + group: "${{ github.workflow }}-${{ github.head_ref }}" + cancel-in-progress: true + +jobs: + lychee: + runs-on: ubuntu-latest + steps: + - name: Checkout source code + uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 0 + + - name: Restore lychee cache + uses: actions/cache@v3 + with: + path: .lycheecache + key: cache-lychee-${{ github.sha }} + restore-keys: cache-lychee- + + - name: Check links + id: lychee + uses: lycheeverse/lychee-action@v1.8.0 + with: + fail: true + args: --max-concurrency 1 --cache --no-progress --exclude-all-private './**/*.md'