Generate GeoJSON #141
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: Generate GeoJSON | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
permissions: | |
contents: | |
write | |
jobs: | |
generate-geojson: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r scripts/requirements.txt | |
- name: generate geojson | |
run: | | |
python scripts/generate_map.py | |
- name: stash changes | |
run: | | |
git add map.json && git stash | |
- name: Check out to map branch | |
uses: actions/checkout@v2 | |
with: | |
ref: map | |
- name: unstash changes | |
run: | | |
git rm map.json && git stash pop | |
- name: commit and push | |
uses: EndBug/add-and-commit@v9 | |
with: | |
author_name: Post Editor | |
author_email: [email protected] | |
message: 'generate map' |