Skip to content

Commit 7c24348

Browse files
authored
Merge pull request #7 from GOMC-WSU/find_linkcheckerrc
Find linkcheckerrc
2 parents 11327f2 + 62fb6ab commit 7c24348

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/linkchecker.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ on:
33
pull_request:
44
branches:
55
- main
6-
- LinkChecker
6+
- find_linkcheckerrc
77
push:
88
branches:
99
- main
10-
- LinkChecker
10+
- find_linkcheckerrc
1111
schedule:
1212
# run every Sunday at 00:00 UTC
1313
- cron: '0 0 * * 0'
@@ -23,9 +23,15 @@ jobs:
2323
pip3 install --upgrade pip
2424
pip3 install linkchecker==10.2.1
2525
pip3 install requests
26+
- name: search for linkcheckerrc file
27+
id: find-file
28+
run: |
29+
file_path=$(find /home/runner/.local/lib/python3.* -name linkcheckerrc)
30+
echo "linkcheckerrc located here: $file_path"
31+
echo "file_path=$file_path" >> $GITHUB_OUTPUT
2632
- name: amend linkcheckerrc to ignore 403 errors
2733
run: |
28-
sed -i '/#ignoreerrors=/a ignoreerrors=\n ^http* ^403 Forbidden\n ^http* ^418 Unknown Code' /home/runner/.local/lib/python3.10/site-packages/linkcheck/data/linkcheckerrc
34+
sed -i '/#ignoreerrors=/a ignoreerrors=\n ^http* ^403 Forbidden\n ^http* ^418 Unknown Code' $(echo ${{ steps.find-file.outputs.file_path }})
2935
- name: run linkchecker
3036
run: |
3137
cd $GITHUB_WORKSPACE/

0 commit comments

Comments
 (0)