Skip to content

wildfires-etl

wildfires-etl #22037

Workflow file for this run

name: wildfires-etl
on:
# workflow_dispatch
schedule:
- cron: '11 * * * *' # runs every hour on the 11th minute
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: checkout repo content
uses: actions/checkout@v2 # checkout the repository content to github runner
- name: setup python
uses: actions/setup-python@v2
with:
python-version: '3.9.7' # install the python version needed
- name: install things
run: |
python -m pip install --upgrade pip
pip install pandas==1.3.2 geopandas==0.9.0 Fiona==1.8.20 mapbox-tilesets mapboxcli
git clone https://github.com/golfecholima/tippecanoe.git
cd tippecanoe
make -j
make install
- name: execute py script # run etl.py to get the latest data
env:
TOKEN: ${{ secrets.MAPBOX_TOKEN_CLI }}
run: python california-wildfires-map/etl/etl.py
- name: commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git pull
git add -A
git commit -m "update data" -a
- name: push changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main