Geocoder #405
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: Geocoder | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' # every day at midnight | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Install spatialite | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libsqlite3-mod-spatialite | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install spatialite | |
pip install requests | |
- name: Download data | |
run: python download_data.py | |
- name: Run geocoder | |
run: python geocode_data.py | |
- name: Run CSV files | |
run: python generate_csv.py | |
- name: check for changes | |
run: git status | |
- name: commit changed files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . | |
git diff-index --quiet HEAD || git commit -m "Auto update of geocoded data" | |
- name: fetch from main | |
run: git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* | |
- name: push code to main | |
run: git push origin HEAD:main |