Skip to content

Commit fa86a65

Browse files
committed
fix: exclude npmjs.com from CI link check
A browser user agent didn't help -- npmjs.com's bot protection blocks GitHub Actions runners outright, confirmed by a failing CI run. The link itself works fine; it's just unreachable from CI.
1 parent c5d5c38 commit fa86a65

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.lychee.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ max_retries = 3
99
retry_wait_time = 5
1010
timeout = 20
1111

12-
# Some hosts (e.g. npmjs.com) return 403 to non-browser user agents.
13-
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
14-
1512
# Treat rate-limited responses as passing rather than failing CI -- a 429
1613
# means the host is alive and throttling us, not that the link is dead.
1714
accept = ["200..=299", "429"]
@@ -21,3 +18,10 @@ accept = ["200..=299", "429"]
2118
exclude_path = [
2219
"node_modules",
2320
]
21+
22+
# npmjs.com sits behind bot protection that blocks GitHub Actions runners
23+
# outright (a browser user agent alone didn't fix it -- confirmed by a
24+
# failing CI run) -- not a dead link, just unreachable from CI.
25+
exclude = [
26+
'^https://(www\.)?npmjs\.com',
27+
]

0 commit comments

Comments
 (0)