Link Checker #89
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Link Checker | |
on: | |
pull_request: | |
branches: | |
- main | |
- LinkChecker | |
push: | |
branches: | |
- main | |
- LinkChecker | |
schedule: | |
# run every Sunday at 00:00 UTC | |
- cron: '0 0 * * 0' | |
jobs: | |
verify: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: | | |
pip3 install --upgrade pip | |
pip3 install linkchecker==10.2.1 | |
pip3 install requests | |
- name: check json file links | |
run: | | |
cd $GITHUB_WORKSPACE/tests | |
python3 linkchecker.py $GITHUB_WORKSPACE/data | |
- name: run linkchecker | |
run: | | |
cd $GITHUB_WORKSPACE/ | |
nohup python3 -m http.server </dev/null >/dev/null 2>&1 & | |
export LOCAL_HOST=$(hostname -i) | |
linkchecker --verbose --check-extern http://${LOCAL_HOST}:8000/nav.html | |