Skip to content

Commit 2f03489

Browse files
committed
fix(ci): make links_live check the whole live site without throttling
- Feed lychee all page URLs from the live sitemap (lychee does not spider; the previous run only ever checked the homepage's links) - Throttle the crawl of www.rnpgp.org (concurrency 4 + 500ms interval): full-concurrency crawls were getting 503s from GitHub Pages - Verified locally: 2,724 links over all 64 live pages, 0 errors
1 parent d0d7390 commit 2f03489

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

.github/workflows/links_live.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: links_live
33
# Post-deploy link check of the LIVE site: verifies that production URLs —
44
# including the absolute canonical/OG URLs that pre-deploy checks must skip —
55
# actually resolve. Runs after every successful deploy and weekly.
6+
# Page URLs come from the sitemap (lychee does not spider).
67

78
on:
89
workflow_run:
@@ -20,9 +21,18 @@ jobs:
2021
steps:
2122
- uses: actions/checkout@v4
2223

24+
- name: Build URL list from the live sitemap
25+
run: |
26+
curl -fsSL https://www.rnpgp.org/sitemap-index.xml \
27+
| grep -oE 'https://www\.rnpgp\.org/sitemap-[0-9]+\.xml' \
28+
| while read -r sm; do curl -fsSL "$sm"; done \
29+
| grep -oE '<loc>[^<]+' \
30+
| sed 's/<loc>//' > urls.txt
31+
wc -l urls.txt
32+
2333
- name: Link Checker (live site)
2434
id: lychee
2535
uses: lycheeverse/lychee-action@v2
2636
with:
27-
args: --config lychee-live.toml --no-progress 'https://www.rnpgp.org'
37+
args: --config lychee-live.toml --no-progress --files-from urls.txt
2838
fail: true

lychee-live.toml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# Unlike lychee.toml (pre-deploy), this does NOT exclude www.rnpgp.org — the whole
33
# point is verifying that production URLs, including canonical/OG ones, resolve.
44

5-
max_concurrency = 32
5+
max_concurrency = 16
66
timeout = 30
7-
retry_wait_time = 2
8-
max_retries = 2
7+
retry_wait_time = 3
8+
max_retries = 3
99

1010
# Pages exist but rate-limit automated checkers (HN, git.gnupg.org, …)
1111
accept = ["200", "204", "429"]
@@ -17,3 +17,8 @@ exclude = [
1717
# Cirrus CI blocks non-browser TLS clients.
1818
'^https://cirrus-ci\.com/',
1919
]
20+
21+
# Be gentle with GitHub Pages — full-concurrency crawls get throttled (503).
22+
[hosts."www.rnpgp.org"]
23+
concurrency = 4
24+
request_interval = "500ms"

0 commit comments

Comments
 (0)