name: meet-seed
on:
  schedule:
    - cron: "37 6 * * *"
  workflow_dispatch:
permissions:
  contents: write
jobs:
  train:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - name: cpu torch
        run: pip install --quiet torch --index-url https://download.pytorch.org/whl/cpu
      - name: harvest + train
        run: python3 scripts/automate_meet.py --steps 80
      - name: commit ledger if changed
        run: |
          git config user.name meet-seed
          git config user.email meet-seed@users.noreply.github.com
          git add artifacts/meet_last.txt artifacts/meet_ledger.jsonl artifacts/corpus.txt 2>/dev/null || true
          git diff --cached --quiet || git commit -m "meet: daily seed ledger"
          git push || true
