name: Daily snapshot

on:
  schedule:
  - cron: '0 4 * * *'   # run every day at 4 AM
  workflow_dispatch:

jobs:
  snapshot:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: pnpm/action-setup@v4
      with:
        version: 9
        run_install: false
    - uses: actions/setup-node@v4
      with:
        node-version: 20
        cache: 'pnpm'
    - run: pnpm install
    - run: pnpm run snapshot
