From 51d66b2dee2b2a762eaa7fe88c66383cd968d9ac Mon Sep 17 00:00:00 2001 From: Dan Cummins Date: Fri, 19 May 2023 10:42:07 +0100 Subject: [PATCH 1/6] Added GitHub workflow to check for broken links --- .github/workflows/broken-link-check.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/broken-link-check.yml diff --git a/.github/workflows/broken-link-check.yml b/.github/workflows/broken-link-check.yml new file mode 100644 index 000000000..67f78cbc6 --- /dev/null +++ b/.github/workflows/broken-link-check.yml @@ -0,0 +1,19 @@ +on: + schedule: + - cron: 0 0 1 * * # run monthly + repository_dispatch: # run manually + types: [check-link] + # push: + # ... + +name: Broken Link Check +jobs: + check: + name: Broken Link Check + runs-on: ubuntu-latest + steps: + - name: Broken Link Check + uses: technote-space/broken-link-checker-action@v2 + with: + TARGET: https://muse-os.readthedocs.io/en/latest/ + From 61e6293bfacec80321df88941de842be45e7f62a Mon Sep 17 00:00:00 2001 From: Dan Cummins Date: Fri, 19 May 2023 11:21:08 +0100 Subject: [PATCH 2/6] Run workflow on push --- .github/workflows/broken-link-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/broken-link-check.yml b/.github/workflows/broken-link-check.yml index 67f78cbc6..40dcb8d92 100644 --- a/.github/workflows/broken-link-check.yml +++ b/.github/workflows/broken-link-check.yml @@ -3,8 +3,8 @@ on: - cron: 0 0 1 * * # run monthly repository_dispatch: # run manually types: [check-link] - # push: - # ... + push: + branches: [develop, broken_link_checker] name: Broken Link Check jobs: From 501ec0ee317d326b86a2998c5ebd60714db53a5c Mon Sep 17 00:00:00 2001 From: Dan Cummins Date: Fri, 19 May 2023 11:30:27 +0100 Subject: [PATCH 3/6] Recursively check for broken links --- .github/workflows/broken-link-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/broken-link-check.yml b/.github/workflows/broken-link-check.yml index 40dcb8d92..ca498d8b9 100644 --- a/.github/workflows/broken-link-check.yml +++ b/.github/workflows/broken-link-check.yml @@ -16,4 +16,4 @@ jobs: uses: technote-space/broken-link-checker-action@v2 with: TARGET: https://muse-os.readthedocs.io/en/latest/ - + RECURSIVE: true From 5711d68ea9c68caa36e569040e1ed7b84e7a914c Mon Sep 17 00:00:00 2001 From: Dan Cummins Date: Fri, 19 May 2023 13:41:16 +0100 Subject: [PATCH 4/6] Switch from technote-space to ruzickap link checker --- .github/workflows/broken-link-check.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/broken-link-check.yml b/.github/workflows/broken-link-check.yml index ca498d8b9..4270b127a 100644 --- a/.github/workflows/broken-link-check.yml +++ b/.github/workflows/broken-link-check.yml @@ -1,8 +1,6 @@ on: schedule: - cron: 0 0 1 * * # run monthly - repository_dispatch: # run manually - types: [check-link] push: branches: [develop, broken_link_checker] @@ -13,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Broken Link Check - uses: technote-space/broken-link-checker-action@v2 + uses: ruzickap/action-my-broken-link-checker@v2 with: - TARGET: https://muse-os.readthedocs.io/en/latest/ - RECURSIVE: true + url: https://muse-os.readthedocs.io/en/latest/ + cmd_params: '--buffer-size=8192 --max-connections=3 --color=always --skip-tls-verification --header="User-Agent:curl/7.54.0" --timeout=10' # muffet parameters From 448e5adb10086cdcf8300dee9220f18450660650 Mon Sep 17 00:00:00 2001 From: Dan Cummins Date: Fri, 19 May 2023 14:02:03 +0100 Subject: [PATCH 5/6] Added back run manually, added correct branches to run on, removed unnecessary cmd param --- .github/workflows/broken-link-check.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/broken-link-check.yml b/.github/workflows/broken-link-check.yml index 4270b127a..1ad0014a7 100644 --- a/.github/workflows/broken-link-check.yml +++ b/.github/workflows/broken-link-check.yml @@ -1,8 +1,10 @@ on: schedule: - cron: 0 0 1 * * # run monthly + repository_dispatch: # run manually + types: [check-link] push: - branches: [develop, broken_link_checker] + branches: [main, develop_imperial] name: Broken Link Check jobs: @@ -14,4 +16,4 @@ jobs: uses: ruzickap/action-my-broken-link-checker@v2 with: url: https://muse-os.readthedocs.io/en/latest/ - cmd_params: '--buffer-size=8192 --max-connections=3 --color=always --skip-tls-verification --header="User-Agent:curl/7.54.0" --timeout=10' # muffet parameters + cmd_params: '--buffer-size=8192 --max-connections=3 --color=always --skip-tls-verification --header="User-Agent:curl/7.54.0"' # muffet parameters From c30d6f5491018fd72c9e1611f0de387a31308bfb Mon Sep 17 00:00:00 2001 From: Dan Cummins Date: Fri, 19 May 2023 15:11:34 +0100 Subject: [PATCH 6/6] Updated change log --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e42afc4b..f344a620c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Features +- Add GitHub action to check for broken links ([#115](https://github.com/SGIModel/MUSE_OS/pull/115)) - Inconsistent trade case study ([#58](https://github.com/SGIModel/MUSE_OS/pull/58)) - Update README.txt in installation path ([#57](https://github.com/SGIModel/MUSE_OS/pull/57)) - Add tests to check the case of not using retrofit agents ([#53](https://github.com/SGIModel/MUSE_OS/pull/53))