diff --git a/.github/workflows/lychee.yml b/.github/workflows/lychee.yml new file mode 100644 index 0000000..f9df814 --- /dev/null +++ b/.github/workflows/lychee.yml @@ -0,0 +1,32 @@ +name: Check Links + +on: + push: + branches: + - main + pull_request: + branches: + - main + schedule: + # Run weekly on Monday at 00:00 UTC + - cron: '0 0 * * 1' + workflow_dispatch: + +jobs: + check-links: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Link Checker + uses: lycheeverse/lychee-action@v2 + with: + # Check all markdown files in the repository + args: --verbose --no-progress --max-retries 3 --accept=200,204,429 '**/*.md' + # Fail action on broken links + fail: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}