Files
godot-docs/.github/workflows/check_urls.yml
Hugo Locurcio 5bf9ef3aa6 CI: Check URLs on schedule only to reduce false positives
Links occasionally fail due to network issues or other transient problems.
This should not cause pull requests to fail checks.

The check is now performed weekly at a random-looking time on Fridays
(when server load isn't too high).
2025-03-28 15:43:32 +01:00

37 lines
932 B
YAML

name: 🌐 Check URLs
on:
schedule:
# Every Friday at 16:27 UTC.
# URLs can decay over time. Setting up a schedule makes it possible to be warned
# about dead links as soon as possible.
- cron: "27 16 * * FRI"
jobs:
check-urls:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Restore lychee cache
uses: actions/cache@v4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- name: Run lychee
uses: lycheeverse/lychee-action@v2
with:
args: >
--base .
--no-progress
--cache
--max-cache-age 1d
--exclude-path _templates/
--exclude-path classes/
"**/*.md" "**/*.html" "**/*.rst"
- name: Fail if there were link errors
run: exit ${{ steps.lc.outputs.exit_code }}