From d1a4157d71c65d4892000fe8b2c21bdbb60b014c Mon Sep 17 00:00:00 2001 From: Sebastian Raschka Date: Thu, 11 Apr 2024 17:23:15 -0400 Subject: [PATCH] improve check-links.yml --- .github/workflows/check-links.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index c55f25b..56d0e7f 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -19,6 +19,17 @@ jobs: - name: Install Markdown Link Checker run: npm install -g markdown-link-check + - name: Create config for markdown link checker + run: | + echo '{ + "projectBaseUrl":"${{ github.workspace }}", + "ignorePatterns": [ + { + "pattern": "^#" + } + ] + }' > $GITHUB_WORKSPACE/md_checker_config.json + - name: Find Markdown Files and Check Links run: | - find . -name '*.md' -exec markdown-link-check {} \; + find . -name \*.md -print0 | xargs -0 -n1 markdown-link-check -c $GITHUB_WORKSPACE/md_checker_config.json