-
Notifications
You must be signed in to change notification settings - Fork 15
55 lines (44 loc) · 1.19 KB
/
fetch-pgm-maps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: '18'
- name: checkout map fetcher
uses: actions/checkout@v3
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
- uses: actions/upload-artifact@v3
with:
name: pgm.json
path: ./src/data/maps/pgm.json
- name: trigger page rebuild
uses: peter-evans/repository-dispatch@v2
with:
event-type: run_build