Skip to content

Commit 6a15fdb

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 6a15fdb

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

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

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,20 @@ 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: curl/8.7.1" \
33+
--header="Accept: */*" \
34+
--rate-limit=1 \
35+
--ignore-fragments \
36+
--skip-tls-verification \
37+
--max-connections-per-host=1 \
38+
--timeout=20 \
39+
--buffer-size=2147483647 \
40+
--color=always \
41+
--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)).*$" \
42+
--exclude="https://github.com/YOURGITHUBID/fabric-docs-i18n/pull/new/newtranslation" \
43+
https://hyperledger-fabric.readthedocs.io/en/latest/

0 commit comments

Comments
 (0)