fetch-pgm-maps #143
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: fetch-pgm-maps | |
on: | |
schedule: | |
- cron: "0 6 * * 1" | |
workflow_dispatch: | |
jobs: | |
fetch-pgm-maps: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: checkout map fetcher | |
uses: actions/checkout@v4 | |
with: | |
repository: MCResourcePile/map-fetcher | |
path: "./map-fetcher" | |
- name: install dependencies | |
run: | | |
cd ./map-fetcher | |
npm install | |
- name: execute script | |
run: | | |
cd ./map-fetcher | |
node src/index.js --source="../src/data/maps/pgm.json" | |
- name: remove temp files | |
run: | | |
rm -r ./map-fetcher | |
- name: commit changes | |
if: github.event_name != 'pull_request' | |
uses: EndBug/add-and-commit@v9 | |
with: | |
message: Update PGM maps data file | |
- name: trigger page rebuild | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
event-type: run_build |