rationalise workflows
- csv-to-topo updater now only works for PRs : csv shouldn't be directly updated in a push to master - csv-to-topo can now be manually triggered if needed - clearer formatting for actions
This commit is contained in:
parent
5e643b4ee3
commit
7a2b83a97c
5
.github/workflows/minify-map-json.yml
vendored
5
.github/workflows/minify-map-json.yml
vendored
|
@ -5,15 +5,19 @@ on:
|
|||
- master
|
||||
paths:
|
||||
- 'boundaries.geo.json'
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
processJson:
|
||||
if: "!contains(github.event.head_commit.message, 'from hughrun/geo-to-topo')"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Update GeoJSON boundaries
|
||||
run: |
|
||||
sudo npm install -g mapshaper
|
||||
|
@ -21,6 +25,7 @@ jobs:
|
|||
sudo npm install -g topojson-server
|
||||
geo2topo boundaries.geo.json -q 50000 > website/data/boundaries.topo.json
|
||||
python3 ./.github/scripts/merge_csv_to_topojson.py
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
|
|
2
.github/workflows/update-topo-on-info-pr.yml
vendored
2
.github/workflows/update-topo-on-info-pr.yml
vendored
|
@ -5,6 +5,8 @@ on:
|
|||
paths:
|
||||
- 'website/data/library_services_information.csv'
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
auto-topo-updater:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
25
.github/workflows/update-topo-on-info-push.yml
vendored
25
.github/workflows/update-topo-on-info-push.yml
vendored
|
@ -1,25 +0,0 @@
|
|||
name: topo auto updater (push)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
paths:
|
||||
- 'website/data/library_services_information.csv'
|
||||
- '!website/data/boundaries.topo.json'
|
||||
jobs:
|
||||
auto-topo-updater:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- name: Merge CSV to TopoJSON
|
||||
run: |
|
||||
python3 ./.github/scripts/merge_csv_to_topojson.py
|
||||
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: merge csv data to topo
|
Loading…
Reference in a new issue