generated from google/docsy-example
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (47 loc) · 2.11 KB
/
link-check.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: 'Link Check'
on:
workflow_dispatch:
push:
branches: main
pull_request:
branches: main
schedule:
- cron: '34 12 * * *'
jobs:
link-check:
name: Check GitHub repo links at ${{github.repository}}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Verify muffet filter wrapper is found
run: |
WRAPPER_FILENAME="mfw"
WRAPPER="./.muffet-filter/$WRAPPER_FILENAME"
if test -f "$WRAPPER"; then
echo "using wrapper $WRAPPER"
else
PROJECT_URL="https://github.com/bhamail/muffet-filter"
echo "Missing muffet-filter wrapper file $WRAPPER. Download here: $PROJECT_URL" && exit 1
fi
- name: Run muffet filter wrapper
# run: ./.muffet-filter/mfw --muffet-arg=--verbose --muffet-arg=--accepted-status-codes='200..300,429' --muffet-arg=-f https://github.com/sonatype-nexus-community/contribute.sonatype.com
# run: ./.muffet-filter/mfw --muffet-arg=--verbose --muffet-arg=--rate-limit=10 --muffet-arg=--accepted-status-codes='200..300,429' --muffet-arg=-f https://github.com/sonatype-nexus-community/contribute.sonatype.com
# TODO Figure out show to remove --one-page-only without swamping the network
run: ./.muffet-filter/mfw --muffet-arg=--one-page-only --muffet-arg=-f https://github.com/sonatype-nexus-community/contribute.sonatype.com
link-check-site:
name: Check published web site links at https://contribute.sonatype.com/
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Verify muffet filter wrapper is found
run: |
WRAPPER_FILENAME="mfw"
WRAPPER="./.muffet-filter/$WRAPPER_FILENAME"
if test -f "$WRAPPER"; then
echo "using wrapper $WRAPPER"
else
PROJECT_URL="https://github.com/bhamail/muffet-filter"
echo "Missing muffet-filter wrapper file $WRAPPER. Download here: $PROJECT_URL" && exit 1
fi
- name: Run muffet filter wrapper
run: ./.muffet-filter/mfw -i .muffet-filter/ignores-site.json https://contribute.sonatype.com/