Fix broken external links found with automated link checking #17
Workflow file for this run
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: Check broken links | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - '**.md' | |
| - 'docs/**' | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| check-links: | |
| name: Check links in documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Restore lychee cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: .lycheecache | |
| key: cache-lychee-${{ github.sha }} | |
| restore-keys: cache-lychee- | |
| - name: Check links with lychee | |
| uses: lycheeverse/lychee-action@v2 | |
| with: | |
| args: | | |
| --verbose | |
| --no-progress | |
| --cache | |
| --max-cache-age 1d | |
| --accept 100..=103,200..=299,403,429 | |
| --exclude 'localhost' | |
| --exclude 'fortuneservice' | |
| --exclude '\.internal' | |
| --exclude 'consul-register-example' | |
| --exclude '^docker://' | |
| --exclude-path '.git' | |
| --exclude-path 'docs/api' | |
| --max-concurrency 5 | |
| --max-retries 6 | |
| --retry-wait-time 15 | |
| --timeout 30 | |
| '**/*.md' | |
| fail: true | |
| jobSummary: true | |
| - name: Comment on PR with link check results | |
| if: always() && github.event_name == 'pull_request' | |
| uses: mshick/add-pr-comment@v2 | |
| with: | |
| message-id: broken-links-check | |
| message-path: ./lychee/out.md |