check_urls.yml 950 B

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