linkcheck #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: linkcheck | |
| # Verify that every [](url) link in the Markdown sources resolves with a good | |
| # status code. Runs on PRs and pushes to main, plus weekly to catch link rot. | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| schedule: | |
| - cron: "0 6 * * 1" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: linkcheck-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| markdown-links: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check all Markdown links | |
| uses: lycheeverse/lychee-action@v2 | |
| with: | |
| args: >- | |
| --config lychee.toml --no-progress | |
| --exclude-path node_modules --exclude-path site | |
| "**/*.md" | |
| fail: true | |
| # A repo state with no links in its Markdown is legitimate (the | |
| # skeleton README has none); only broken links should fail the job. | |
| failIfEmpty: false | |
| env: | |
| # Authenticated GitHub requests avoid api.github.com / github.com rate limits. | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |