mirror of
https://github.com/shuaibiyy/awesome-tf.git
synced 2026-04-30 11:27:52 -05:00
feat: add lychee.toml and lycheecache support
Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
10
.github/workflows/link-checker.yml
vendored
10
.github/workflows/link-checker.yml
vendored
@@ -7,5 +7,15 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
||||||
|
|
||||||
|
- name: Restore lychee cache
|
||||||
|
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
|
||||||
|
with:
|
||||||
|
path: .lycheecache
|
||||||
|
key: cache-lychee-${{ github.sha }}
|
||||||
|
restore-keys: cache-lychee-
|
||||||
|
|
||||||
- name: Link Checker
|
- name: Link Checker
|
||||||
uses: lycheeverse/lychee-action@885c65f3dc543b57c898c8099f4e08c8afd178a2 # v2
|
uses: lycheeverse/lychee-action@885c65f3dc543b57c898c8099f4e08c8afd178a2 # v2
|
||||||
|
with:
|
||||||
|
args: --config ./lychee.toml README.md
|
||||||
|
|||||||
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Lychee link checker cache
|
||||||
|
.lycheecache
|
||||||
24
lychee.toml
Normal file
24
lychee.toml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Lychee link checker configuration
|
||||||
|
|
||||||
|
# Maximum number of retries per link
|
||||||
|
max_retries = 3
|
||||||
|
|
||||||
|
# Wait time between retries (in seconds)
|
||||||
|
retry_wait_time = 5
|
||||||
|
|
||||||
|
# Maximum number of concurrent network requests
|
||||||
|
max_concurrency = 10
|
||||||
|
|
||||||
|
# Accept 429 status codes (rate limiting) as valid after retries
|
||||||
|
# This prevents CI failures due to temporary rate limits
|
||||||
|
accept = [200, 204, 206, 429]
|
||||||
|
|
||||||
|
# Alternative: Exclude hashicorp.com if rate limiting persists
|
||||||
|
# Uncomment the line below if you want to skip hashicorp.com checks entirely
|
||||||
|
# exclude = ['https://www\.hashicorp\.com/.*']
|
||||||
|
|
||||||
|
# Cache results to avoid repeated checks
|
||||||
|
cache = true
|
||||||
|
|
||||||
|
# Use a custom user agent to be more identifiable
|
||||||
|
user_agent = "awesome-tf link checker (https://github.com/shuaibiyy/awesome-tf)"
|
||||||
Reference in New Issue
Block a user