From d0522a3934bfd06258cee50d92e31365f621baec Mon Sep 17 00:00:00 2001 From: "Federico M. Facca" Date: Tue, 17 Dec 2024 16:41:32 +0100 Subject: [PATCH] use linkspector to check links --- .github/config/.linkspector.yml | 14 ++++++++++++++ .github/workflows/markdown.yaml | 19 ++++++------------- 2 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 .github/config/.linkspector.yml diff --git a/.github/config/.linkspector.yml b/.github/config/.linkspector.yml new file mode 100644 index 0000000..3af9edd --- /dev/null +++ b/.github/config/.linkspector.yml @@ -0,0 +1,14 @@ +# https://github.com/UmbrellaDocs/linkspector?tab=readme-ov-file#configuration +dirs: + - . +useGitIgnore: true +aliveStatusCodes: + - 200 + - 201 + - 204 + - 206 + - 429 +ignorePatterns: + - pattern: '^https://localhost' + - pattern: '^https://github.com/orgs/zaphiro-technologies/' + - pattern: '^https://github.com/zaphiro-technologies/' \ No newline at end of file diff --git a/.github/workflows/markdown.yaml b/.github/workflows/markdown.yaml index 3e81991..747d74b 100644 --- a/.github/workflows/markdown.yaml +++ b/.github/workflows/markdown.yaml @@ -38,7 +38,7 @@ on: type: boolean config-links-path: required: false - default: '.github/config/md-link-config.json' + default: '.github/config/.linkspector.yml' type: string config-lint-path: default: '.github/config/.markdownlint.json' @@ -72,7 +72,7 @@ jobs: scripts: - '.github/config/.markdownlint.json' - '.github/config/.prettierignore' - - '.github/config/md-link-config.json' + - '.github/config/.linkspector.yml' - '.gramma.json' - '.grammarignore' - 'grammar-check.sh' @@ -113,18 +113,11 @@ jobs: rm -fr */vendor # Checks the status of hyperlinks in .md and .MD files in verbose mode (the action is case sensitive and .{MD,md}) - name: Check links (.md) - uses: gaurav-nelson/github-action-markdown-link-check@v1 + uses: umbrelladocs/action-linkspector@v1 with: - config-file: ${{ inputs.config-link-path || '.github/config/md-link-config.json' }} - use-verbose-mode: 'yes' - use-quiet-mode: 'yes' - - name: Check links (.MD) - uses: gaurav-nelson/github-action-markdown-link-check@v1 - with: - config-file: ${{ inputs.config-link-path || '.github/config/md-link-config.json' }} - use-verbose-mode: 'yes' - use-quiet-mode: 'yes' - file-extension: '.MD' + filter_mode: nofilter + reporter: github-pr-review + config_file: ${{ inputs.config-link-path || '.github/config/.linkspector.yml' }} markdown-spellchecker: runs-on: ubuntu-latest needs: changes