Skip to content

Commit c7992ac

Browse files
committed
fix: link checker
1 parent f090d83 commit c7992ac

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/link-checker.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Link Checker
2+
3+
on:
4+
pull_request:
5+
schedule:
6+
- cron: '0 2 * * *'
7+
8+
jobs:
9+
check-links:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: lycheeverse/lychee-action@v2
15+
with:
16+
args: --no-progress --exclude 'http://localhost' '**/*.ts' '**/*.tsx' '**/*.mdx'
17+
fail: true
18+
19+
- name: Notify Slack on failure
20+
if: failure() && github.event_name == 'schedule'
21+
run: |
22+
curl -X POST ${{ secrets.SLACK_WEBHOOK_URL }} \
23+
-H 'Content-type: application/json' \
24+
-d '{"text": "🔴 Dead links detected in nightly link check. <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View run>"}'

0 commit comments

Comments
 (0)