Skip to content

Generate Latest Data #6

Generate Latest Data

Generate Latest Data #6

name: Generate Latest Data
on:
schedule:
# Runs at 8 AM UTC every day
- cron: '0 8 * * *'
workflow_dispatch:
jobs:
execute-script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install dependencies
run: yarn install
- name: Get data and update file
run: |
OUTPUT="$(node ./utils/GenerateLatestData.js)"
echo "$OUTPUT" > ./website/public/data/latest.json
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add ./website/public/data/latest.json
git commit -m "Update latest data"
git push