Skip to content

Commit 9e64de6

Browse files
committed
fix broken link check
- added headers so that some sites skip the request rather than return a 403 error (yes, not for everyone, but I'll deal with this later) - site https://hyperledger-fabric.readthedocs.io / has a limit of 60 requests per minute, configured so that the number of requests does not exceed this limit. Error 429 on this site has gone away. - added exceptions so that the crawl takes place only in /en/latest/, because, for example, /zh-cn/latest/ is located in another repository. Now it will be possible to work with it.: - handle 404 errors - handle 403 errors Signed-off-by: Fedor Partanskiy <[email protected]>
1 parent 7887caf commit 9e64de6

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

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

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,21 @@ jobs:
2424
steps:
2525
- name: Checkout Fabric Code
2626
uses: actions/checkout@v4
27-
- name: Setup Go
28-
uses: actions/setup-go@v5
29-
with:
30-
go-version-file: go.mod
31-
- name: Install Muffet
32-
run: go install github.com/raviqqe/muffet/v2@latest
3327
- name: Check Broken Links with Muffet
3428
# 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/
29+
run: |
30+
docker run raviqqe/muffet:2.11.0 \
31+
--max-response-body-size=100000000 \
32+
--header="User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36" \
33+
--header="Accept: */*" \
34+
--header="Accept-encoding: gzip, deflate, br, zstd" \
35+
--rate-limit=1 \
36+
--ignore-fragments \
37+
--skip-tls-verification \
38+
--max-connections-per-host=1 \
39+
--timeout=20 \
40+
--buffer-size=2147483647 \
41+
--color=always \
42+
--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)).*$" \
43+
--exclude="https://github.com/YOURGITHUBID/fabric-docs-i18n/pull/new/newtranslation" \
44+
https://hyperledger-fabric.readthedocs.io/en/latest/

0 commit comments

Comments
 (0)