Event Data Update #115
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: '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: "data: event update ${{env.ACTION_DATE}}" |