Update Problem List #28265
This file contains hidden or 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: 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 |