Skip to content

Commit

Permalink
Update MonthlyLinkCheck.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sekyondaMeta authored Jan 30, 2025
1 parent 52b6fcc commit b324cb5
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions .github/workflows/MonthlyLinkCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,11 @@ jobs:
- name: Check Links
uses: lycheeverse/lychee-action@v1
with:
args: --accept=200,403,429 --base . --verbose --no-progress
args: --accept=200,403,429 --base . --verbose --no-progress --no-progress './**/*.md' './**/*.html' './**/*.rst'
token: ${{ secrets.CUSTOM_TOKEN }}
fail: true

- name: Create Issue for Broken Links
if: failure() && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
uses: actions/github-script@v6
with:
script: |
const { data: issues } = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
labels: 'incorrect links',
state: 'open'
});

if (issues.length === 0) {
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: 'Broken Links Detected',
body: 'The link check has detected broken links in the repository. Please review and fix them.',
labels: ['incorrect links']
});
}

- name: Suggestions
if: failure()
Expand Down

0 comments on commit b324cb5

Please sign in to comment.