Added link checker #5
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 documentation links" | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - "[0-9]+.[0-9]+" | |
| workflow_dispatch: | |
| inputs: | |
| force_recheck: | |
| description: "Clear lychee cache and recheck all links from scratch" | |
| type: boolean | |
| default: false | |
| pull_request: ~ | |
| schedule: | |
| - cron: "0 6 * * *" | |
| jobs: | |
| link-check: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [3.13] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install MkDocs dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Build documentation | |
| run: mkdocs build --strict | |
| - name: Restore lychee cache | |
| if: ${{ !inputs.force_recheck }} | |
| uses: actions/cache@v4 | |
| with: | |
| path: .lycheecache | |
| key: lychee-${{ github.ref_name }}-${{ hashFiles('lychee.toml') }} | |
| restore-keys: | | |
| lychee-${{ github.ref_name }}- | |
| lychee- | |
| - name: Check links | |
| uses: lycheeverse/lychee-action@v2 | |
| with: | |
| args: >- | |
| --config lychee.toml | |
| --cache | |
| --cache-exclude-status "400.." | |
| site | |
| fail: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload link-check report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lychee-report | |
| path: lychee-report.md | |
| if-no-files-found: ignore |