Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions .github/workflows/broken-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,17 @@ jobs:
- uses: actions/checkout@v3
- name: Generate link check config with internal link replacement patterns
run: |
jq --arg ws "$GITHUB_WORKSPACE" '. + {
jq --arg ws "/github/workspace" '. + {
"replacementPatterns": [
{"pattern": "^(/[^#?]+/)$", "replacement": ("file://" + $ws + "$1")},
{"pattern": "^(/[^#?.]+)$", "replacement": ("file://" + $ws + "$1.md")},
{"pattern": "^(/[^#?]+\\.[A-Za-z0-9]+)$", "replacement": ("file://" + $ws + "$1")}
]
}' \
.github/workflows/markdown.links.config.json > "$RUNNER_TEMP/mlc.config.json"
.github/workflows/markdown.links.config.json > "$GITHUB_WORKSPACE/.github/workflows/mlc.config.generated.json"
- uses: gaurav-nelson/github-action-markdown-link-check@v1
id: checker
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '${{ runner.temp }}/mlc.config.json'
- uses: slackapi/slack-github-action@v1
if: failure()
id: slack
with:
payload: '{"blocks":[{"type":"section","text":{"type":"mrkdwn","text":"Website Broken Link Check Status : *${{steps.checker.outcome}}*. \n\n Details : https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} "}}]}'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
config-file: '.github/workflows/mlc.config.generated.json'
2 changes: 1 addition & 1 deletion .github/workflows/markdown.links.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{ "pattern" : "^https?://podcasts\\.apple\\.com/"},
{ "pattern" : "^https://subnero\\.com/solutions/swan\\.html"}
],
"aliveStatusCodes": [200, 202, 206, 301, 302, 303, 304, 403, 429, 999],
"aliveStatusCodes": [200, 202, 206, 301, 302, 303, 304, 403, 418, 429, 999],
"retryOn429": true,
"retryCount": 5,
"fallbackRetryDelay": "30s",
Expand Down
Loading