forked from cwjoshuak/lostarktimer.app-web
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1016 Bytes
/
event-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
name: 'Event Data Updater'
run-name: Event Data Update
on:
workflow_dispatch:
schedule:
# Run every Wednesday at 09:00 UTC (during weekly maintenance)
- cron: '0 9 * * 3'
jobs:
Update-Event-Data:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Configure date
run: |
echo "ACTION_DATE=$(date --rfc-3339=date)" >> ${GITHUB_ENV}
- name: Pull Remote Changes
run: |
git pull
- name: Install npm packages
run: |
npm i
- name: Compile TS files
run: |
npx tsc ./bin/AutoScraper.ts
npx tsc ./bin/EventCompare.ts
- name: Gather Event Data
run: node ./bin/event-update.js
- name: Commit changes to data
uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: 'data/*.json'
commit_message: "Event data update: ${{env.ACTION_DATE}}"