-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (38 loc) · 1.2 KB
/
broken_link_checker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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)