| # push current tree to both github and hugging face. | |
| # requires GH_TOKEN and HF_TOKEN in env (never hard-code secrets here). | |
| set -e | |
| : "${GH_TOKEN:?set GH_TOKEN}" | |
| : "${HF_TOKEN:?set HF_TOKEN}" | |
| # github (code + paper + figures, no data) | |
| git push "https://${GH_TOKEN}@github.com/bryanc5864/PRISM.git" main | |
| # hugging face: use the hf CLI for structured uploads. | |
| # omit --include so we push everything except caches / build junk. | |
| hf auth login --token "$HF_TOKEN" >/dev/null 2>&1 | |
| for d in panda scripts figures; do | |
| [ -d "$d" ] && hf upload bryan7264/PANDA "$d" "$d" --repo-type model \ | |
| --exclude "**/__pycache__/**" --exclude "**/.cache/**" \ | |
| --commit-message "sync $d" || true | |
| done | |
| for f in PAPER.tex PAPER.pdf README.md; do | |
| [ -f "$f" ] && hf upload bryan7264/PANDA "$f" "$f" --repo-type model \ | |
| --commit-message "sync $f" || true | |
| done | |
| echo "push complete" | |