This is an automated email from the ASF dual-hosted git repository.

zhongjiajie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 3abe7b7e1a [CI] Dead link checker performance improvement (#982)
3abe7b7e1a is described below

commit 3abe7b7e1aaf9ee8f818ada7babf9224e5f2fe5f
Author: xiangzihao <[email protected]>
AuthorDate: Tue May 13 12:42:29 2025 +0800

    [CI] Dead link checker performance improvement (#982)
---
 .github/workflows/dead-link-checker.yaml | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/dead-link-checker.yaml 
b/.github/workflows/dead-link-checker.yaml
index 54b4a524cd..5ad6e60098 100644
--- a/.github/workflows/dead-link-checker.yaml
+++ b/.github/workflows/dead-link-checker.yaml
@@ -42,12 +42,28 @@ jobs:
       - run: npm install fs-extra --save-dev
       - name: Generate the images of Logs and Events
         run: node ./scripts/generate_imgs
-      - run: sudo npm install -g [email protected]
+      - run: sudo npm install -g [email protected]
+      - run: sudo apt install plocate -y && sudo updatedb
       # We need to delete directory swap before markdown checker
       - name: Checker
         run: |
           rm -rf ./swap
           rm -rf ./node_modules
-          for file in $(find . -name "*.md"); do
-            markdown-link-check -c .dlc.json -q "$file"
+          set -xe
+          MAX_CONCURRENCY=6
+          EXIT_CODE=0
+
+          cleanup() {
+            pkill -P $$
+            exit "$EXIT_CODE"
+          }
+
+          trap cleanup SIGINT SIGTERM
+
+          for file in $(locate "$PWD*/*.md" | grep -v ./.github); do
+            while [ $(jobs -r | wc -l) -ge "$MAX_CONCURRENCY" ]; do
+              wait -n || { EXIT_CODE=$?; cleanup; }
+            done
+            markdown-link-check -c .dlc.json -q "$file" &
           done
+          wait || { EXIT_CODE=$?; cleanup; }

Reply via email to