Link Check #133
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: Link Check | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| - cron: '0 0 * * *' # Daily at midnight | |
| jobs: | |
| link-checker: | |
| name: Link Checker | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write # Required for creating issues from file | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 22 | |
| - name: Enable pnpm | |
| run: corepack enable | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build docs | |
| run: pnpm run docs:build | |
| - name: Link Checker | |
| id: lychee | |
| uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2 | |
| with: | |
| # Check all files in the built site | |
| args: | | |
| docs/.vitepress/dist | |
| --root-dir docs/.vitepress/dist | |
| --exclude "^file://" | |
| --accept '200..=299,403' | |
| # Don't fail action on broken links (we'll create an issue instead) | |
| fail: false | |
| # Output format | |
| format: markdown | |
| # Output file path | |
| output: lychee/out.md | |
| - name: Create Issue From File | |
| if: steps.lychee.outputs.exit_code != 0 | |
| uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6.0.0 | |
| with: | |
| title: Link Checker Report | |
| content-filepath: ./lychee/out.md | |
| labels: report, automated issue |