mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 06:09:46 +03:00
GitHub Actions: Check URLs using lychee (#1169)
This makes it possible to be aware of dead links and replace them with other resources (such as archived versions) as soon as possible.
This commit is contained in:
36
.github/workflows/check_urls.yml
vendored
Normal file
36
.github/workflows/check_urls.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: 🌐 Check URLs
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
schedule:
|
||||
# Every day at 18:00 UTC.
|
||||
# URLs can decay over time. Setting up a schedule makes it possible to be warned
|
||||
# about dead links as soon as possible.
|
||||
- cron: "0 18 * * *"
|
||||
|
||||
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
|
||||
"**/*.md" "**/*.gd" "**/*.cs" "**/*.tscn" "**/*.tres" "**/*.html"
|
||||
|
||||
- name: Fail if there were link errors
|
||||
run: exit ${{ steps.lc.outputs.exit_code }}
|
||||
Reference in New Issue
Block a user