diff --git a/.github/workflows/minify-map-json.yml b/.github/workflows/minify-map-json.yml index c7893b5..eb4050f 100644 --- a/.github/workflows/minify-map-json.yml +++ b/.github/workflows/minify-map-json.yml @@ -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: diff --git a/.github/workflows/update-topo-on-info-pr.yml b/.github/workflows/update-topo-on-info-pr.yml index 276da9a..5b932ac 100644 --- a/.github/workflows/update-topo-on-info-pr.yml +++ b/.github/workflows/update-topo-on-info-pr.yml @@ -5,6 +5,8 @@ on: paths: - 'website/data/library_services_information.csv' + workflow_dispatch: + jobs: auto-topo-updater: runs-on: ubuntu-latest diff --git a/.github/workflows/update-topo-on-info-push.yml b/.github/workflows/update-topo-on-info-push.yml deleted file mode 100644 index 4becefa..0000000 --- a/.github/workflows/update-topo-on-info-push.yml +++ /dev/null @@ -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 \ No newline at end of file