From 24f12bb64973773415f0e32d5cf3aa3488f8e8a4 Mon Sep 17 00:00:00 2001 From: sekyondaMeta <127536312+sekyondaMeta@users.noreply.github.com> Date: Fri, 28 Feb 2025 10:29:00 -0500 Subject: [PATCH 1/4] Create MonthlyLinkCheck.yml --- .github/workflows/MonthlyLinkCheck.yml | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/MonthlyLinkCheck.yml diff --git a/.github/workflows/MonthlyLinkCheck.yml b/.github/workflows/MonthlyLinkCheck.yml new file mode 100644 index 00000000000..a771b10ccc6 --- /dev/null +++ b/.github/workflows/MonthlyLinkCheck.yml @@ -0,0 +1,40 @@ +name: Monthly Link Check +on: + pull_request: + branches: [main] + schedule: + - cron: '0 0 1 * *' # Runs at midnight on the first day of every month + workflow_dispatch: # Allows manual triggering of the workflow +jobs: + linkChecker: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + - name: Check Links + id: lychee + uses: lycheeverse/lychee-action@v2 + with: + args: --accept=200,403,429 --base . --verbose --no-progress './**/*.md' './**/*.html' './**/*.rst' + token: ${{ secrets.CUSTOM_TOKEN }} + fail: true + + - name: Create Issue From File + if: failure() && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') + uses: peter-evans/create-issue-from-file@v5 + with: + title: Broken links detected in docs 🔗 + content-filepath: ./lychee/out.md + labels: 'incorrect links' + #token: ${{ secrets.CUSTOM_TOKEN }} + + + - name: Suggestions + if: failure() + run: | + echo -e "\nPlease review the links reported in the Check links step above." + echo -e "If a link is valid but fails due to a CAPTCHA challenge, IP blocking, login requirements, etc., consider adding such links to .lycheeignore file to bypass future checks.\n" + exit 1 From 0222017e741cb206df692c41225f97b26eb8eb97 Mon Sep 17 00:00:00 2001 From: sekyondaMeta <127536312+sekyondaMeta@users.noreply.github.com> Date: Fri, 28 Feb 2025 10:34:02 -0500 Subject: [PATCH 2/4] Update MonthlyLinkCheck.yml --- .github/workflows/MonthlyLinkCheck.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/MonthlyLinkCheck.yml b/.github/workflows/MonthlyLinkCheck.yml index a771b10ccc6..569ea8bcca3 100644 --- a/.github/workflows/MonthlyLinkCheck.yml +++ b/.github/workflows/MonthlyLinkCheck.yml @@ -1,3 +1,8 @@ +#Runs once a month and checks links in the repo to ensure they are valid +#If action fails, it creates an issue with the failing links and an "incorrect link" label +#If link is valid but failing, it can be added to the .lycheeignore file + + name: Monthly Link Check on: pull_request: @@ -28,7 +33,7 @@ jobs: with: title: Broken links detected in docs 🔗 content-filepath: ./lychee/out.md - labels: 'incorrect links' + labels: 'incorrect link' #token: ${{ secrets.CUSTOM_TOKEN }} From 5082e35a20214aab9486aff5be4661c5d8463fce Mon Sep 17 00:00:00 2001 From: sekyondaMeta <127536312+sekyondaMeta@users.noreply.github.com> Date: Fri, 28 Feb 2025 10:41:17 -0500 Subject: [PATCH 3/4] Update MonthlyLinkCheck.yml --- .github/workflows/MonthlyLinkCheck.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/MonthlyLinkCheck.yml b/.github/workflows/MonthlyLinkCheck.yml index 569ea8bcca3..afac06126c7 100644 --- a/.github/workflows/MonthlyLinkCheck.yml +++ b/.github/workflows/MonthlyLinkCheck.yml @@ -1,6 +1,7 @@ #Runs once a month and checks links in the repo to ensure they are valid #If action fails, it creates an issue with the failing links and an "incorrect link" label #If link is valid but failing, it can be added to the .lycheeignore file +#Action can also be run manually as needed. name: Monthly Link Check From ea13fa720e401ff0a43f164db032c17330bb31dd Mon Sep 17 00:00:00 2001 From: sekyondaMeta <127536312+sekyondaMeta@users.noreply.github.com> Date: Fri, 28 Feb 2025 10:45:53 -0500 Subject: [PATCH 4/4] Update MonthlyLinkCheck.yml --- .github/workflows/MonthlyLinkCheck.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/MonthlyLinkCheck.yml b/.github/workflows/MonthlyLinkCheck.yml index afac06126c7..4c8a841c57b 100644 --- a/.github/workflows/MonthlyLinkCheck.yml +++ b/.github/workflows/MonthlyLinkCheck.yml @@ -6,8 +6,6 @@ name: Monthly Link Check on: - pull_request: - branches: [main] schedule: - cron: '0 0 1 * *' # Runs at midnight on the first day of every month workflow_dispatch: # Allows manual triggering of the workflow