Skip to content

Debug

Debug #61

name: "Broken Link Check"
on:
push:
schedule:
- cron: 0 0 * * 0 # run every Sunday at midnight
jobs:
check:
name: "Check for broken links"
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: "Checkout code"
uses: actions/checkout@v2
- name: "Check for broken links"
uses: lycheeverse/lychee-action@v1
id: lychee
with:
fail: true
jobSummary: true
args: --no-progress --accept '200..=299, 401, 405' .
- name: "Send Slack alert"
if: ${{ failure() }}
uses: slackapi/[email protected]
env:
SLACK_WEBHOOK_URL: "https://hooks.slack.com/triggers/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" # TODO: set as env var?
with:
payload: |
{
"Details": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
- name: "Fail workflow"
if: ${{ failure() }}
run: exit ${{ env.lychee_exit_code }}