From f34811eb45ee4fbabd489c7705ff2dfdabdaf35b Mon Sep 17 00:00:00 2001 From: Mahe Tardy Date: Tue, 31 Oct 2023 17:37:47 +0100 Subject: [PATCH] ci: check docs links fixes and configuration 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 --- .github/lychee.toml | 11 +++++++++++ .github/workflows/check-links-cron.yaml | 2 +- .github/workflows/check-links-pr.yaml | 3 ++- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 .github/lychee.toml diff --git a/.github/lychee.toml b/.github/lychee.toml new file mode 100644 index 00000000000..5d09a549bfa --- /dev/null +++ b/.github/lychee.toml @@ -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' +] diff --git a/.github/workflows/check-links-cron.yaml b/.github/workflows/check-links-cron.yaml index a857a93b8f6..c4118865f0a 100644 --- a/.github/workflows/check-links-cron.yaml +++ b/.github/workflows/check-links-cron.yaml @@ -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 diff --git a/.github/workflows/check-links-pr.yaml b/.github/workflows/check-links-pr.yaml index 886116e6f5c..2a90c2e8e39 100644 --- a/.github/workflows/check-links-pr.yaml +++ b/.github/workflows/check-links-pr.yaml @@ -3,6 +3,7 @@ name: Check docs links on: pull_request: paths: + - 'README.md' - 'docs/content/**.md' - '.github/workflows/check-links-pr.yaml' @@ -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