Scrape #6373
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: '0 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' | |
- id: install-pipenv | |
name: Install pipenv | |
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python | |
shell: bash | |
- name: Setup | |
run: pipenv run python setup.py install | |
shell: bash | |
- id: make | |
name: Run scrape command | |
run: | | |
pipenv run nasawildfires modis --indent=2 > data/modis.json | |
pipenv run nasawildfires viirs-suomi --indent=2 > data/viirs-suomi.json | |
pipenv run nasawildfires viirs-noaa --indent=2 > data/viirs-noaa.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 |