From 67f63d9202a99b7f9777a171e900abf617abc6c9 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Thu, 28 Jan 2021 18:57:43 +1100 Subject: [PATCH] update github action - apparently it needs sudo with no password to npm install? - also added ability to run the json update action manually --- .github/scripts/minify-map-json.sh | 4 ++-- .github/workflows/minify-map-json.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/scripts/minify-map-json.sh b/.github/scripts/minify-map-json.sh index d512cc6..49aa8dc 100644 --- a/.github/scripts/minify-map-json.sh +++ b/.github/scripts/minify-map-json.sh @@ -1,4 +1,4 @@ -npm install -g mapshaper +sudo npm install -g mapshaper mapshaper ./boundaries.geo.json snap -clean -o force precision=0.0001 format=geojson ./boundaries.geo.json -npm install -g topojson-server +sudo npm install -g topojson-server geo2topo ./boundaries.geo.json -q 50000 > ./website/data/boundaries.topo.json \ No newline at end of file diff --git a/.github/workflows/minify-map-json.yml b/.github/workflows/minify-map-json.yml index 627e941..ba2b028 100644 --- a/.github/workflows/minify-map-json.yml +++ b/.github/workflows/minify-map-json.yml @@ -5,6 +5,7 @@ on: - master paths: - 'boundaries.geo.json' + workflow_dispatch: jobs: prepare: runs-on: ubuntu-latest -- 2.39.5