Broken Link Checker #420
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: "Broken Link Checker" | |
on: | |
schedule: | |
- cron: '59 07 * * *' # UTC 7:59(23:59 PST Winter Time) everyday | |
jobs: | |
link_check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: git action | |
uses: actions/checkout@master | |
with: | |
fetch-depth: 0 | |
- name: Broken Link Script | |
run: | | |
chmod +x ./.github/workflow_scripts/link_check.sh && ./.github/workflow_scripts/link_check.sh | |
- name: Commit & Push changes | |
uses: actions-js/push@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: 'master' | |
message: 'csv files with broken links' | |
force: true | |
- name: Check CSV Files | |
shell: python | |
run: | | |
import pandas as pd | |
df = pd.read_csv("Broken Links Stable.csv") | |
if not df.empty: | |
exit(1) | |
df = pd.read_csv("Broken Links Dev.csv") | |
if not df.empty: | |
exit(1) |