From 1bcf673e625fd000dd0d1fe90152ace7c195c88a Mon Sep 17 00:00:00 2001 From: Adam Kudrna Date: Mon, 7 Aug 2023 11:27:56 +0200 Subject: [PATCH] Check all Markdowns for broken external links --- .github/markdown-link-check.json | 10 ++++++++++ .github/workflows/broken-links-check.yml | 13 +++++++------ .github/workflows/external-links-check.yml | 15 +++++++++++++++ 3 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 .github/markdown-link-check.json create mode 100644 .github/workflows/external-links-check.yml diff --git a/.github/markdown-link-check.json b/.github/markdown-link-check.json new file mode 100644 index 00000000..3bbd632c --- /dev/null +++ b/.github/markdown-link-check.json @@ -0,0 +1,10 @@ +{ + "ignorePatterns": [ + { + "pattern": "^/components/" + }, + { + "pattern": "^/docs/" + } + ] +} diff --git a/.github/workflows/broken-links-check.yml b/.github/workflows/broken-links-check.yml index cc2732bd..1bced87a 100644 --- a/.github/workflows/broken-links-check.yml +++ b/.github/workflows/broken-links-check.yml @@ -1,20 +1,21 @@ -name: Broken links check +name: Broken Links Check + on: schedule: - - cron: '0 0 * * 0' # weekly + - cron: '0 6 * * *' # daily at 6:00 UTC (7:00 CET, 8:00 CEST) jobs: broken_link_check: - runs-on: ubuntu-latest - name: Check for broken links + runs-on: ubuntu-20.04 + name: Check react-ui.io for broken links steps: - name: Check for broken links id: link-report - uses: celinekurpershoek/link-checker@v1 + uses: celinekurpershoek/link-checker@v1.0.2 with: url: 'https://react-ui.io' honorRobotExclusions: false - ignorePatterns: "www.racom.eu" + ignorePatterns: "*.racom.eu*" - name: Get the result run: echo "${{steps.link-report.outputs.result}}" diff --git a/.github/workflows/external-links-check.yml b/.github/workflows/external-links-check.yml new file mode 100644 index 00000000..57c3455b --- /dev/null +++ b/.github/workflows/external-links-check.yml @@ -0,0 +1,15 @@ +name: External Links Check + +on: + pull_request: + +jobs: + broken_link_check: + name: Markdown link check + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + config-file: '.github/markdown-link-check.json' + use-verbose-mode: 'yes'