Update url-checker.yml #16
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: Check Broken Links | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Runs daily at midnight | |
push: | |
branches: | |
- canary | |
- main | |
workflow_dispatch: | |
jobs: | |
url-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
path: ./scripts/python/url-checker | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests colorama | |
- name: Run URL checker | |
run: python url-checker.py | |
- name: Upload log file | |
uses: actions/upload-artifact@v4 | |
with: | |
name: url-checker-log | |
path: scripts/python/url-checker/url-checker.log | |
- name: Display summary | |
run: cat scripts/python/url-checker/url-checker.log | |
- name: Clean up environment | |
run: rm -rf scripts/python/url-checker/__pycache__ | |
- name: Notify on failure | |
if: failure() | |
run: echo "URL Checker failed. Please check the log file for details." |