Daily Broken Link Check #40
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: Daily Broken Link Check | |
| on: | |
| schedule: | |
| - cron: '0 2 * * *' # Every day at 2:00 AM UTC | |
| workflow_dispatch: | |
| jobs: | |
| lychee: | |
| name: Broken Link Checker | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Run Lychee link checker | |
| id: lychee | |
| uses: lycheeverse/[email protected] | |
| with: | |
| args: > | |
| --verbose | |
| --exclude-mail | |
| --no-progress | |
| --exclude ^https?:// | |
| '**/*.md' | |
| output: lychee/out.md # ✅ Set output file here, not in args | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Add front-matter for issue | |
| if: failure() | |
| run: | | |
| echo -e "---\ntitle: Broken Links Detected\nlabels: broken-links\n---\n$(cat lychee/out.md)" > lychee/out.md | |
| - name: Create or update GitHub issue | |
| if: failure() | |
| uses: JasonEtco/create-an-issue@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| filename: lychee/out.md | |
| update_existing: true | |
| search_existing: open | |