-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (51 loc) · 2.1 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: check-links
on:
workflow_dispatch: # allow manual trigger
push:
branches:
- main
schedule:
# run every 24 hours at 12:00
# * is a special character in YAML so you have to quote this string
- cron: '0 0 12 * *'
jobs:
check-links:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Load EXCLUDE_URL_PREFIX and EXCLUDE_URL_SUFFIX from files
id: load_prefix_suffix
run: |
echo "EXCLUDE_URL_PREFIX=$(cat ./.github/data/exclude_url_prefix.txt | tr '\r\n' ',')" >> $GITHUB_ENV
echo "EXCLUDE_URL_SUFFIX=$(cat ./.github/data/exclude_url_suffix.txt | tr '\r\n' ',')" >> $GITHUB_ENV
- name: Run Broken Links Crawler (landing)
uses: ScholliYT/Broken-Links-Crawler-Action@v3
with:
website_url: '${{ github.server_url }}/${{ github.repository }}'
resolve_before_filtering: 'true'
exclude_url_prefix: '${{ github.server_url }},${{ env.EXCLUDE_URL_PREFIX }}'
exclude_url_suffix: '${{ env.EXCLUDE_URL_SUFFIX }}'
verbose: 'true'
max_retry_time: 30
max_retries: 5
- name: Run Broken Links Crawler (MISC.md)
uses: ScholliYT/Broken-Links-Crawler-Action@v3
with:
website_url: '${{ github.server_url }}/${{ github.repository }}/blob/main/MISC.md'
resolve_before_filtering: 'true'
exclude_url_prefix: '${{ github.server_url }},${{ env.EXCLUDE_URL_PREFIX }}'
exclude_url_suffix: '${{ env.EXCLUDE_URL_SUFFIX }}'
verbose: 'true'
max_retry_time: 30
max_retries: 5
- name: Run Broken Links Crawler (SUCCESS.md)
uses: ScholliYT/Broken-Links-Crawler-Action@v3
with:
website_url: '${{ github.server_url }}/${{ github.repository }}/blob/main/SUCCESS.md'
resolve_before_filtering: 'true'
exclude_url_prefix: '${{ github.server_url }},${{ env.EXCLUDE_URL_PREFIX }}'
exclude_url_suffix: '${{ env.EXCLUDE_URL_SUFFIX }}'
verbose: 'true'
max_retry_time: 30
max_retries: 5