Scrape #5396
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: Scrape | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '10 6 * * *' | |
jobs: | |
scrape: | |
name: Scrape | |
runs-on: ubuntu-latest | |
steps: | |
- id: checkout | |
name: Checkout | |
uses: actions/checkout@v2 | |
- id: install | |
name: Install Python, pipenv and Pipfile packages | |
uses: palewire/install-python-pipenv-pipfile@v2 | |
with: | |
python-version: 3.9 | |
- id: make | |
name: Run make command | |
run: | | |
pipenv run python setup.py install | |
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 | |
- 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 ./ | |
git commit -m "Scrape" && git push || true | |
shell: bash |