diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml new file mode 100644 index 0000000..eec1803 --- /dev/null +++ b/.github/workflows/links.yml @@ -0,0 +1,29 @@ +name: links + +on: + pull_request: + push: + branches: [main] + schedule: + - cron: '41 6 * * 1' # weekly, Monday: catches links that rot after publishing + workflow_dispatch: + +permissions: + contents: read + +jobs: + links: + name: check links + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - name: Check every link in the Markdown files + uses: lycheeverse/lychee-action@v2.9.0 + with: + # 429 means "slow down", not "broken". LinkedIn answers bots with 999, so it is skipped. + args: >- + --no-progress --max-retries 3 --timeout 20 + --accept 200,206,429 + --exclude 'linkedin\.com' + './**/*.md' + fail: true