-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (37 loc) · 1.05 KB
/
check.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
on:
workflow_dispatch: {}
schedule:
- cron: "0 0 * * 0" # weekly
jobs:
check-html:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
token: ${{secrets.GITHUB_TOKEN}}
- name: Set up Python environment
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: pip install -r requirements.txt
- name: Grab data
run: python grab.py
- name: Process data and make map
run: python process.py
- name: Check for Changes
id: git-check
run: |
git diff --exit-code output/ || echo "git-diff-exit-code=$?" >> $GITHUB_ENV
continue-on-error: true
- name: Configure Git
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- name: Commit and Push Output
if: env.git-diff-exit-code == '1'
run: |
git add output/
git commit -m "Add output from GitHub Action"
git push