Check Links #8
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 Links | |
| on: | |
| schedule: | |
| # Runs weekly on Monday at 08:00 UTC | |
| - cron: '0 8 * * 1' | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - '**/index.html' | |
| jobs: | |
| check-links: | |
| runs-on: ubuntu-latest | |
| name: Check index.html files for broken links | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Collect index.html files | |
| id: files | |
| run: | | |
| FILES=$(find . -name "index.html" \ | |
| -not -path "./.git/*" \ | |
| -not -path "*/wwwroot/index.html" \ | |
| | sort | tr '\n' ' ') | |
| echo "files=$FILES" >> "$GITHUB_OUTPUT" | |
| - name: Check links with lychee | |
| uses: lycheeverse/lychee-action@v2 | |
| with: | |
| args: | | |
| --verbose | |
| --no-progress | |
| --timeout 30 | |
| --max-retries 3 | |
| --accept 200,206,429 | |
| --root-dir . | |
| ${{ steps.files.outputs.files }} | |
| fail: true |