🔍 Link Checker #10
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 0 * * 0' # Run weekly on Sunday | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| link-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Check links | |
| uses: gaurav-nelson/github-action-markdown-link-check@v1 | |
| with: | |
| use-quiet-mode: 'yes' | |
| use-verbose-mode: 'yes' | |
| config-file: '.github/workflows/link-check-config.json' | |
| - name: Create issue on link failure | |
| if: failure() | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| github.rest.issues.create({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| title: '🔗 Broken links detected', | |
| body: 'The automated link checker found broken links in the repository. Please check the workflow logs for details.', | |
| labels: ['bug', 'broken-links'] | |
| }) |