Skip to content

Scrape Sacramento City trees #1357

Scrape Sacramento City trees

Scrape Sacramento City trees #1357

Workflow file for this run

name: Scrape Sacramento City trees
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Scrape Sacramento City trees
run: |-
curl "https://opendata.arcgis.com/api/v3/datasets/b9b716e09b5048179ab648bb4518452b_0/downloads/data?format=csv&spatialRefId=4326" > sac-trees.csv
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add *.csv
timestamp=$(date -u)
git commit -m "Latest data: ${timestamp}" || exit 0
git push