Persist CSV database to cache #969
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: Persist CSV database to cache | |
on: | |
schedule: | |
# At 5am every day | |
- cron: 0 5 * * * | |
workflow_dispatch: | |
jobs: | |
persist-csv-database-to-cache: | |
name: Persist CSV database to cache | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '22.19.0' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- uses: actions/cache@v4 | |
id: cache-csv-database | |
with: | |
path: data/persisted-to-cache/database.csv | |
key: csv-database-${{ github.run_id }} | |
restore-keys: | | |
csv-database- | |
csv-database-${{ github.run_id }} | |
- run: node scripts/updateCsvDatabaseRecords.ts data/persisted-to-cache/database.csv |