name: Sync to Hugging Face Hub on: push: branches: [main] # Change to master if needed workflow_dispatch: jobs: sync-to-hub: runs-on: ubuntu-latest steps: - name: Checkout Code with Full History uses: actions/checkout@v4 with: fetch-depth: 0 # <-- CRUCIAL: Fetches ALL git history instead of just the latest commit lfs: true # Includes Git LFS files if you have large model weights - name: Push Git History to Hugging Face env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | # Push the history using your token for authentication git push --force https://build-small-hackathon:$HF_TOKEN@huggingface.co/spaces/build-small-hackathon/step-zero main