Link Checker #208
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: | |
| repository_dispatch: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "00 18 * * *" | |
| jobs: | |
| linkChecker: | |
| name: "Check Links" | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: production | |
| permissions: | |
| issues: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: app/resources | |
| key: app-v1-${{ hashFiles('app/Dockerfile') }} | |
| - name: Decrypt private contents | |
| run: make decrypt | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| SOPS_KMS_ARN: "${{ secrets.SOPS_KMS_ARN }}" | |
| - name: Build site | |
| run: make build | |
| - name: Run lychee to check for broken links | |
| id: lychee | |
| run: make check-links | |
| continue-on-error: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create issues for broken links | |
| if: hashFiles('app/resources/link-report.md') != '' | |
| uses: peter-evans/create-issue-from-file@v6 | |
| with: | |
| title: Broken links found by automated link checker | |
| content-filepath: app/resources/link-report.md |