Broken Links Checker #205
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
| #Check the rendered page for dead links | |
| name: Broken Links Checker | |
| permissions: | |
| contents: read | |
| issues: write | |
| on: | |
| schedule: | |
| - cron: '0 16 * * *' | |
| workflow_dispatch: | |
| env: | |
| WEBSITE_URL: "https://redhat-cop.github.io/automation-good-practices/" | |
| ISSUE_TEMPLATE: ".github/workflows/issue_template_broken_link.md" | |
| jobs: | |
| check_links: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Run Broken Links Checker | |
| run: npx broken-link-checker $WEBSITE_URL --ordered --recursive --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0" --exclude "https://opensource.org/licenses/BSD-2-Clause" --exclude "github.com" | |
| - uses: actions/checkout@v3 | |
| if: failure() | |
| - uses: JasonEtco/create-an-issue@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| filename: ${{ env.ISSUE_TEMPLATE }} | |
| if: failure() |