generated from palewire/python-open-source-template
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.56 KB
/
scrape.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
name: Scrape
on:
workflow_dispatch:
schedule:
- cron: '10 6 * * *'
jobs:
scrape:
name: Scrape
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pipenv'
- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- id: pipenv-install
name: Install Python dependencies
run: pipenv sync --dev
- id: make
name: Run make command
run: |
pipenv run pip install -e .
pipenv run nwsaurora images --pole=north > data/images-north.json
pipenv run nwsaurora images --pole=south > data/images-south.json
pipenv run nwsaurora images --pole=north --latest > data/latest-image-north.txt
pipenv run nwsaurora images --pole=south --latest > data/latest-image-north.txt
pipenv run nwsaurora grid > data/grid.json
pipenv run nwsaurora forecast > data/forecast.json
shell: bash
- name: Datestamp
run: date > data/timestamp.txt
shell: bash
- id: commit
name: Commit results
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "actions@github.com"
git config pull.rebase false
git status
git pull origin $GITHUB_REF
git add ./data
git commit -m "Scrape" && git push || true
shell: bash