check_urls.yml 932 B

12345678910111213141516171819202122232425262728293031323334353637
  1. name: 🌐 Check URLs
  2. on:
  3. schedule:
  4. # Every Friday at 16:27 UTC.
  5. # URLs can decay over time. Setting up a schedule makes it possible to be warned
  6. # about dead links as soon as possible.
  7. - cron: "27 16 * * FRI"
  8. jobs:
  9. check-urls:
  10. runs-on: ubuntu-24.04
  11. steps:
  12. - uses: actions/checkout@v4
  13. - name: Restore lychee cache
  14. uses: actions/cache@v4
  15. with:
  16. path: .lycheecache
  17. key: cache-lychee-${{ github.sha }}
  18. restore-keys: cache-lychee-
  19. - name: Run lychee
  20. uses: lycheeverse/lychee-action@v2
  21. with:
  22. args: >
  23. --base .
  24. --no-progress
  25. --cache
  26. --max-cache-age 1d
  27. --exclude-path _templates/
  28. --exclude-path classes/
  29. "**/*.md" "**/*.html" "**/*.rst"
  30. - name: Fail if there were link errors
  31. run: exit ${{ steps.lc.outputs.exit_code }}