Skip to content

Commit

Permalink
ci: check docs links fixes and configuration
Browse files Browse the repository at this point in the history
This commits adds a new config for the link checker lychee. This should
reduce the noise from some false negatives or un-reliable websites. It
also makes the config less different between PR and main branch checks.

Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
  • Loading branch information
mtardy committed Oct 31, 2023
1 parent ae22f19 commit f34811e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .github/lychee.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
verbose = "info"

exclude = [
# this application is down from time to time
'cilium.herokuapp.com',
# the relative link in README is implicit,
# see https://github.blog/2013-01-31-relative-links-in-markup-files/
'docs/assets/icons/logo.*\.svg',
# the virtualbox website sends 500 regularly
'virtualbox.org'
]
2 changes: 1 addition & 1 deletion .github/workflows/check-links-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
args: --base https://tetragon.cilium.io docs/content README.md
args: --config .github/lychee.toml --base https://tetragon.io docs/content README.md

# to avoid automated spam, try to find an existing open issue before opening a new one
- name: Search for existing issue number
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/check-links-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Check docs links
on:
pull_request:
paths:
- 'README.md'
- 'docs/content/**.md'
- '.github/workflows/check-links-pr.yaml'

Expand Down Expand Up @@ -41,7 +42,7 @@ jobs:
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
args: --base http://localhost:1313 --exclude cilium.herokuapp.com docs/content
args: --config .github/lychee.toml --base http://localhost:1313 docs/content README.md
fail: true
format: json

0 comments on commit f34811e

Please sign in to comment.