-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (44 loc) · 1.32 KB
/
check-broken-links.yaml
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
name: Check for Broken Links
'on':
push:
paths:
- '**/*.md'
- 'wiki/**'
pull_request:
types: [ opened ]
branches: [ main ]
workflow_dispatch:
schedule:
# every monday at night
- cron: '0 1 * * 1'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Check the README for broken links
uses: Wandalen/wretry.action@v1.3.0
with:
action: becheran/mlc@v0.16.2
with: |
args: README.md
attempt_limit: 3
attempt_delay: 2000
- name: Publish the Wiki
uses: Andrew-Chen-Wang/github-wiki-action@v4
# we do not need to republish if nothing changes furthermore, do not publish on PR as this should be done by the push on main!
if: ${{ (github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main')) && !failure() }}
with:
path: "wiki/"
token: ${{ secrets.GH_DEPLOY_WIKI }}
- name: Check the Wiki pages for broken links
uses: Wandalen/wretry.action@v1.3.0
if: ${{ always() && !failure() }}
with:
action: becheran/mlc@v0.16.2
with: |
args: wiki/
attempt_limit: 3
attempt_delay: 2000