Link Check #655
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: | |
| pull_request: | |
| branches: [main, v1] | |
| paths: | |
| - "docs/**/*.md" | |
| - "docs/**/*.mdx" | |
| - ".lycheeignore" | |
| - ".github/workflows/links.yml" | |
| push: | |
| branches: [main, v1] | |
| paths: | |
| - "docs/**/*.md" | |
| - "docs/**/*.mdx" | |
| - ".lycheeignore" | |
| - ".github/workflows/links.yml" | |
| schedule: | |
| - cron: "0 0 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| link-check: | |
| name: Check links | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Restore lychee cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: .lycheecache | |
| key: cache-lychee-${{ github.sha }} | |
| restore-keys: cache-lychee- | |
| - name: Run link checker | |
| id: lychee | |
| uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2 | |
| with: | |
| args: --accept 200,203,301..=304,403,429 --cache --max-cache-age 1d --verbose --no-progress --root-dir './docs' 'docs/**/*.md' 'docs/**/*.mdx' | |
| fail: false | |
| format: markdown | |
| jobSummary: true | |
| output: ./lychee/out.md | |
| - name: Fail on broken links | |
| if: steps.lychee.outputs.exit_code == 1 | |
| run: exit 1 | |
| - name: Create issue from report | |
| if: steps.lychee.outputs.exit_code == 1 | |
| uses: peter-evans/create-issue-from-file@v6 | |
| with: | |
| title: Link Checker Report | |
| content-filepath: ./lychee/out.md | |
| labels: report, automated issue |