Skip to content

Update Problem List #28269

Update Problem List

Update Problem List #28269

name: Update Problem List
on:
schedule:
- cron: "40 * * * *"
jobs:
update_problem_list:
runs-on: ubuntu-latest
env:
TZ: America/Toronto
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies
working-directory: ./backend/src/
run: npm i
- name: Update
working-directory: ./backend/src/
run: node get_all_problems.js
- name: Setup Github Users
run: |
git config --local user.email "ethany.zhao-Bot@mail.utoronto.ca"
git config --local user.name "Bot"
git pull
git add .
git diff-index --quiet HEAD || git commit -m "Update data"
git push origin main