-
Notifications
You must be signed in to change notification settings - Fork 3
78 lines (78 loc) · 1.92 KB
/
update.yaml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Scrape latest data
#
on:
push:
push:
schedule:
- cron: "12 * * * *"
workflow_dispatch:
#
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
-
name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
-
name: "Check out this repo"
uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: update nyt urls
working-directory: .
run: |
python nyt.py
- name: update npr urls
working-directory: .
run: |
python npr.py
- name: update wapo urls
working-directory: .
run: |
python wapo.py
- name: update propublica urls
working-directory: .
run: |
python propub.py
- name: update lat urls
working-directory: .
run: |
python lat.py
- name: update usat urls
working-directory: .
run: |
python usat.py
- name: update politico urls
working-directory: .
run: |
python politico.py
- name: update cbs urls
working-directory: .
run: |
python cbs.py
- name: update nbc urls
working-directory: .
run: |
python nbc.py
- name: update abc urls
working-directory: .
run: |
python abc.py
- name: update cnn urls
working-directory: .
run: |
python cnn.py
-
name: "Commit and push if it changed"
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add -A
timestamp=$(date -u)
git commit -m "Latest data: ${timestamp}" || exit 0
git push