External link check #5
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
| # Scheduled external-link check (lychee). Kept OFF the PR gate so flaky or | |
| # rate-limited third-party sites never block a merge. Internal links and images | |
| # are validated on every PR by htmltest (see .htmltest.yml); this job checks | |
| # only external URLs — .lycheeignore skips our own domain. | |
| # (lychee resolves relative links against --base-url https://alcops.dev.) | |
| name: External link check | |
| on: | |
| schedule: | |
| - cron: '0 6 * * 1' # Mondays, 06:00 UTC | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| build: | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/build.yaml | |
| with: | |
| upload-site-artifact: true | |
| lychee: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| issues: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 # for .lycheeignore | |
| - name: Download built site | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: site | |
| path: public | |
| - name: Check external links | |
| id: lychee | |
| uses: lycheeverse/lychee-action@v2 | |
| with: | |
| args: >- | |
| --no-progress | |
| --config .github/lychee.toml | |
| --base-url https://alcops.dev | |
| "public/**/*.html" | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| fail: false | |
| - name: Open issue on broken links | |
| if: steps.lychee.outputs.exit_code != 0 | |
| uses: peter-evans/create-issue-from-file@v6 | |
| with: | |
| title: Broken external links detected | |
| content-filepath: ./lychee/out.md | |
| labels: | | |
| dependencies | |
| links |