Skip to content

Commit d228d7b

Browse files
committed
fix broken link check
- add 403 status - we only check en/latest Signed-off-by: Fedor Partanskiy <fredprtnsk@gmail.com>
1 parent 7887caf commit d228d7b

File tree

1 file changed

+45
-11
lines changed

1 file changed

+45
-11
lines changed

.github/workflows/broken-link-checker.yml

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,54 @@ permissions:
1616
contents: read
1717

1818
jobs:
19-
broken-lint-checker:
19+
# broken-lint-checker:
20+
# # Only run the scheduled job in hyperledger/fabric repository, not on personal forks
21+
# if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'hyperledger/fabric')
22+
# name: "Check for Broken Links"
23+
# runs-on: ${{ github.repository == 'hyperledger/fabric' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }}
24+
# steps:
25+
# - name: Checkout Fabric Code
26+
# uses: actions/checkout@v4
27+
# - name: Check Broken Links with Muffet
28+
# # Exclude any links that direct to the documentation or release notes of the non-latest version to limit the scanning to target to that of the latest version.
29+
# run: |
30+
# docker run raviqqe/muffet:2.11.0 \
31+
# --max-response-body-size=100000000 \
32+
# --header="User-Agent: Go-http-client/2.0" \
33+
# --rate-limit=1 \
34+
# --max-connections-per-host=2 \
35+
# --timeout=20 \
36+
# --buffer-size=2147483647 \
37+
# --color=always \
38+
# --exclude="^(https:\/\/hyperledger-fabric.readthedocs.io\/([A-z_]+\/(v[\d]+.[\d]+.[\d]+|release)|(es|fa|fr|it|ja|ko|ml|pt|ru|vi|zh-cn|zh_CN)\/latest)).*$" \
39+
# https://hyperledger-fabric.readthedocs.io/en/latest/
40+
41+
broken-lint-checker1:
2042
# Only run the scheduled job in hyperledger/fabric repository, not on personal forks
2143
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'hyperledger/fabric')
22-
name: "Check for Broken Links"
44+
name: "Check for Broken Links1"
2345
runs-on: ${{ github.repository == 'hyperledger/fabric' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }}
2446
steps:
2547
- name: Checkout Fabric Code
26-
uses: actions/checkout@v4
27-
- name: Setup Go
28-
uses: actions/setup-go@v5
48+
uses: actions/checkout@v5
49+
- name: Link Checker
50+
id: lychee
51+
uses: lycheeverse/lychee-action@v2
2952
with:
30-
go-version-file: go.mod
31-
- name: Install Muffet
32-
run: go install github.com/raviqqe/muffet/v2@latest
33-
- name: Check Broken Links with Muffet
34-
# Exclude any links that direct to the documentation or release notes of the non-latest version to limit the scanning to target to that of the latest version.
35-
run: muffet --max-response-body-size=100000000 --rate-limit=10 --timeout=20 --buffer-size=2147483647 --color=always --exclude="^(https:\/\/hyperledger-fabric.readthedocs.io\/[A-z_]+\/(v[\d]+.[\d]+.[\d]+|release)).*$" https://hyperledger-fabric.readthedocs.io/en/latest/
53+
fail: false
54+
lycheeVersion: v0.21.0
55+
format: markdown
56+
args: --no-progress --exclude '^(https:\/\/hyperledger-fabric.readthedocs.io\/([A-z_]+\/(v[\d]+.[\d]+.[\d]+|release)|(es|fa|fr|it|ja|ko|ml|pt|ru|vi|zh-cn|zh_CN)\/latest)).*$' https://hyperledger-fabric.readthedocs.io/en/latest/
57+
# - name: Check Broken Links with Muffet
58+
# # Exclude any links that direct to the documentation or release notes of the non-latest version to limit the scanning to target to that of the latest version.
59+
# run: |
60+
# docker run raviqqe/muffet:2.11.0 \
61+
# --max-response-body-size=100000000 \
62+
# --header="User-Agent: Go-http-client/2.0" \
63+
# --rate-limit=1 \
64+
# --max-connections-per-host=2 \
65+
# --timeout=20 \
66+
# --buffer-size=2147483647 \
67+
# --color=always \
68+
# --exclude="^(https:\/\/hyperledger-fabric.readthedocs.io\/([A-z_]+\/(v[\d]+.[\d]+.[\d]+|release)|(es|fa|fr|it|ja|ko|ml|pt|ru|vi|zh-cn|zh_CN)\/latest)).*$" \
69+
# https://hyperledger-fabric.readthedocs.io/en/latest/

0 commit comments

Comments
 (0)