-
Notifications
You must be signed in to change notification settings - Fork 34
36 lines (32 loc) · 1.02 KB
/
cron-check-links.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Cron job to check links weekly
# Schedule to run the link checker every Monday at 2:00 AM UTC
on:
schedule:
- cron: '0 2 * * 1'
# Allow manual runs from the Actions tab
workflow_dispatch:
jobs:
cron-check-links:
if: github.repository_owner == 'espressif'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2
with:
args: |
--no-progress
--include-fragments
--exclude-path ./themes/
--exclude-path ./layouts/
.
# Fail action on broken links
fail: true
- name: Suggestions
if: failure()
run: |
echo -e "\nPlease review the links reported in Link Checker 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