From 12ef934e6c19682ff337eabe5110341b9d2cf058 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Thu, 28 Jan 2021 19:11:21 +1100 Subject: [PATCH] reconfigure minify-map-json action - update yml by bringing shell script into the main action yml - add shebang to shell script file in case this doesn't work and we need it still --- .github/scripts/minify-map-json.sh | 1 + .github/workflows/minify-map-json.yml | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/scripts/minify-map-json.sh b/.github/scripts/minify-map-json.sh index 49aa8dc..08b52c4 100644 --- a/.github/scripts/minify-map-json.sh +++ b/.github/scripts/minify-map-json.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash sudo npm install -g mapshaper mapshaper ./boundaries.geo.json snap -clean -o force precision=0.0001 format=geojson ./boundaries.geo.json sudo npm install -g topojson-server diff --git a/.github/workflows/minify-map-json.yml b/.github/workflows/minify-map-json.yml index ba2b028..2e07610 100644 --- a/.github/workflows/minify-map-json.yml +++ b/.github/workflows/minify-map-json.yml @@ -14,10 +14,23 @@ jobs: with: fetch-depth: 0 - name: Update TopoJSON boundaries - run: ./.github/scripts/minify-map-json.sh - merge: + run: | + sudo npm install -g mapshaper + mapshaper ./boundaries.geo.json snap -clean -o force precision=0.0001 format=geojson ./boundaries.geo.json + process: needs: prepare runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Update TopoJSON boundaries + run: | + sudo npm install -g topojson-server + geo2topo ./boundaries.geo.json -q 50000 > ./website/data/boundaries.topo.json + merge: + needs: process + runs-on: ubuntu-latest steps: - name: Merge CSV to TopoJSON run: | -- 2.39.5