Documents the one-time secrets setup (HF_TOKEN + HF_USERNAME) that
the sync-to-hf-space.yml workflow needs before it can mirror GitHub
main to the HF Space. Also explains the --force semantics and the
"GitHub is the single source of truth" contract.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds .github/workflows/sync-to-hf-space.yml which force-pushes main
to the HF Space git remote whenever a commit lands on GitHub main.
This eliminates the dual-push friction: GitHub becomes the single
source of truth, and the HF Space deployed at
https://huggingface.co/spaces/ScoootScooob/clawbench always tracks
the latest GitHub main without manual `git push hf main` calls.
Requires two repository secrets (Settings -> Secrets -> Actions):
HF_TOKEN — write-scoped HF token
(https://huggingface.co/settings/tokens)
HF_USERNAME — HF account username that owns the Space
Optional repo variable:
HF_SPACE_ID — defaults to "ScoootScooob/clawbench", override if
mirroring to a different Space.
Uses --force to replace any Space-side commits that were created by
editing files in the HF UI. This is intentional — the workflow's
contract is that GitHub is authoritative.
Guarded by concurrency group so two simultaneous pushes serialize
instead of racing into a non-fast-forward rejection.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>