Scope README link checker to README files #3
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: README Link Check | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "**/*.md" | |
| - ".lychee.toml" | |
| - ".github/workflows/readme-link-check.yml" | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - "**/*.md" | |
| - ".lychee.toml" | |
| - ".github/workflows/readme-link-check.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| links: | |
| name: Check README and Markdown links | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Check links | |
| uses: lycheeverse/lychee-action@v2 | |
| with: | |
| args: --config .lychee.toml --root-dir "${{ github.workspace }}" --verbose --no-progress "./README.md" "./**/README.md" | |
| format: markdown | |
| output: lychee-report.md | |
| fail: true | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload link report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lychee-report | |
| path: lychee-report.md | |
| if-no-files-found: ignore |