-
Notifications
You must be signed in to change notification settings - Fork 367
48 lines (46 loc) · 1.06 KB
/
update.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
name: Update sets
on:
workflow_dispatch:
schedule:
- cron: '27 23 * * */3'
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: damage-calc
- name: Checkout PS
uses: actions/checkout@v4
with:
repository: smogon/pokemon-showdown
path: pokemon-showdown
- name: Build damage-calc
run: |-
cd damage-calc/import
npm install
npm run compile
cd ../..
- name: Build PS
run: |-
cd pokemon-showdown
npm install
node build
cd ..
- name: Fetch sets
run: |-
cd pokemon-showdown
node --max-old-space-size=4096 tools/set-import
cd ..
rsync -v --delete -r pokemon-showdown/tools/set-import/sets/ damage-calc/import/node_modules/@smogon/sets
cd damage-calc
node import/ps-import
node import/import
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "[email protected]"
git add -A
git commit -m "Update sets" || exit 0
git push || exit 0