Skip to content

Daily database sync #144

Daily database sync

Daily database sync #144

Workflow file for this run

name: Daily database sync
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Fetch records
run: |
export SHEETS_ID=${{ secrets.SHEETS_ID }}
export SHEETS_API_KEY=${{ secrets.SHEETS_API_KEY }}
export SHEETS_NAME=${{ secrets.SHEETS_NAME }}
pnpm sync-data
- name: Push updated database
uses: EndBug/add-and-commit@v9
with:
add: data
message: Update database `date +'%Y-%m-%d'`
committer_name: GitHub Actions
committer_email: 41898282+github-actions[bot]@users.noreply.github.com