From 5471e62e60bc880d4636930e9c2fb2b539a13cdd Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Mon, 6 May 2024 21:18:46 +0000 Subject: [PATCH] Exclude links (#595) Added excludes for some site errors. Added issue update on fail Reviewed-on: https://codeberg.org/forgejo/docs/pulls/595 Reviewed-by: Earl Warren Co-authored-by: TheFox0x7 Co-committed-by: TheFox0x7 --- .forgejo/workflows/links.yml | 21 +++++++++++++++++---- lychee.toml | 9 +++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 lychee.toml diff --git a/.forgejo/workflows/links.yml b/.forgejo/workflows/links.yml index 0a0855a9..02a1dbf4 100644 --- a/.forgejo/workflows/links.yml +++ b/.forgejo/workflows/links.yml @@ -7,11 +7,16 @@ jobs: linkChecker: runs-on: docker steps: - - uses: actions/checkout@v4 + - name: Checkout next + uses: actions/checkout@v4 + + - name: Checkout v7 + uses: actions/checkout@v4 + with: + path: v7 + - name: Install lychee run: | - # Cleanup artifacts from previous run in case it crashed - rm -rf "lychee-v0.15.0-x86_64-unknown-linux-gnu.tar.gz" lychee curl -sLO "https://github.com/lycheeverse/lychee/releases/download/v0.15.0/lychee-v0.15.0-x86_64-unknown-linux-gnu.tar.gz" tar -xvzf "lychee-v0.15.0-x86_64-unknown-linux-gnu.tar.gz" rm "lychee-v0.15.0-x86_64-unknown-linux-gnu.tar.gz" @@ -19,4 +24,12 @@ jobs: - name: Link Checker id: lychee - run: ./lychee --verbose --no-progress --scheme http --scheme https -f markdown -E ./docs + run: ./lychee docs v7/docs --format markdown + + - name: Update issue + if: failure() + uses: https://github.com/peter-evans/create-issue-from-file@v5.0.0 + with: + title: Dead links report + issue-number: 583 + content-filepath: ./report.md diff --git a/lychee.toml b/lychee.toml new file mode 100644 index 00000000..f36e401b --- /dev/null +++ b/lychee.toml @@ -0,0 +1,9 @@ +no_progress = true +output = "report.md" +cache = true +accept = ["200", "429"] +scheme = ["https","http"] +skip_missing = false +include_verbatim = false +exclude = ['^https://forgejo\.octopuce\.forgejo\.org','http://private.forgejo.org', 'https://codeberg.org/forgejo/forgejo/vX.Y/forgejo'] +exclude_all_private = true