public_library_map/.github/workflows/update-topo-on-push.yml
Hugh Rundle 301e0e419d fix action conflict
The add-contributors action and the update-topo action both want to check out the current branch and add a commit at the same time, which causes conflicts. This adds contributors as part of the update-topo action and prevents the contributor update action running if `library_services_information.csv` has changed in the original commit.
2021-02-06 12:37:51 +11:00

37 lines
776 B
YAML

name: topo update (push)
on:
push:
branches:
- master
- main
paths:
- 'website/data/library_services_information.csv'
workflow_dispatch:
jobs:
auto-topo-updater:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Merge CSV to TopoJSON
run: |
python3 ./.github/scripts/merge_csv_to_topojson.py
- name: Update contributors
run: |
npm install cheerio
npm install pretty
node ./.github/scripts/contributors.js
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: merge csv data to topo
commit_author: Library Map Bot <librarymap@hugh.run>