Link Checker #212
This file contains hidden or 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 8000 --bind 127.0.0.1 </dev/null >/tmp/jetsp_http.log 2>&1 & | |
| # run LinkChecker but ignore known external resources (tag managers) | |
| # that tend to block automated requests | |
| linkchecker --verbose --check-extern --ignore-url 'https://www.googletagmanager.com/.*' http://127.0.0.1:8000/nav.html |