Update build.yml #14
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: Download and Process Data | |
on: | |
push: | |
branches: | |
- main # Run this workflow on pushes to the main branch | |
pull_request: | |
branches: | |
- main # Run this workflow on pull requests to the main branch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y gdal-bin unzip | |
- name: Download file | |
run: wget -q https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/110m_cultural/ne_110m_admin_0_countries.shp -O ne_110m_admin_0_countries.shp | |
- name: Convert SHP to GeoJSON | |
run: | | |
ogr2ogr -select admin,iso_a3 -f geojson world-110m.geojson ne_110m_admin_0_countries.shp | |
- name: Output file | |
run: | | |
echo "GeoJSON file created: world-110m.geojson" | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: world-110m.geojson | |
path: world-110m.geojson |