Add link checking and fix broken documentation references #1
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: | |
| schedule: | |
| # Run weekly on Sundays at 00:00 UTC | |
| - cron: '0 0 * * 0' | |
| pull_request: | |
| paths: | |
| - '**.md' | |
| - 'docs/**' | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| check-links: | |
| name: Check links in documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Check links with lychee | |
| uses: lycheeverse/lychee-action@v2 | |
| with: | |
| # Check all markdown files | |
| args: | | |
| --verbose | |
| --no-progress | |
| --accept 100..=103,200..=299,403,429 | |
| --exclude-mail | |
| --exclude 'localhost' | |
| --exclude 'steeltoe.io' | |
| --exclude 'start.steeltoe.io' | |
| --exclude-path '.git' | |
| --max-retries 3 | |
| --timeout 30 | |
| '**/*.md' | |
| # Don't fail the workflow, just report | |
| fail: true | |
| # Create an issue if broken links are found | |
| jobSummary: true | |
| - name: Create Issue From File | |
| if: failure() | |
| uses: peter-evans/create-issue-from-file@v5 | |
| with: | |
| title: Broken links detected | |
| content-filepath: ./lychee/out.md | |
| labels: bug, documentation |