Link Checker #25
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 Checker | |
| on: | |
| schedule: | |
| - cron: "0 2 * * 0" | |
| workflow_dispatch: | |
| jobs: | |
| linkChecker: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| issues: write | |
| env: | |
| BASE_URL: https://filecoin.cloud | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - name: Link Checker | |
| uses: lycheeverse/lychee-action@v2.7.0 | |
| id: lychee | |
| with: | |
| args: | | |
| --accept 100..=103,200..=299,403,429 | |
| --base-url ${{ env.BASE_URL }} | |
| --retry-wait-time 3 | |
| --max-retries 3 | |
| --timeout 30 | |
| --user-agent "Mozilla/5.0 (compatible; LinkChecker/1.0)" | |
| --verbose | |
| --no-progress | |
| "src/**/*.md" | |
| "src/**/*.tsx" | |
| "src/**/*.ts" | |
| format: markdown | |
| output: ./lychee-report.md | |
| fail: false | |
| - name: Create Issue on Link Check Failure | |
| if: steps.lychee.outputs.exit_code != 0 | |
| uses: peter-evans/create-issue-from-file@v6 | |
| with: | |
| title: Link Checker Report | |
| content-filepath: ./lychee-report.md | |
| labels: broken-links |