Spaces:
Build error
Build error
Download .github/workflows/sync-to-hf.yml from codeninja3d/agentctl: direct link, hf CLI and curl.
- Browser
- Download file 1.17 kB
-
https://huggingface.co/spaces/codeninja3d/agentctl/resolve/main/.github/workflows/sync-to-hf.yml
- Command line
-
hf download hf://spaces/codeninja3d/agentctl/.github/workflows/sync-to-hf.yml
-
curl -L -o sync-to-hf.yml https://huggingface.co/spaces/codeninja3d/agentctl/resolve/main/.github/workflows/sync-to-hf.yml
1.17 kB
| name: Sync GitHub (master) → Hugging Face Space (main) | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Sync files to Hugging Face Space | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| run: | | |
| echo "🔐 Configuring Git" | |
| git config --global user.email "actions@github.com" | |
| git config --global user.name "GitHub Actions" | |
| echo "📥 Cloning Hugging Face Space repo" | |
| git clone https://codeninja3d:${HF_TOKEN}@huggingface.co/spaces/codeninja3d/agentctl hf-space | |
| echo "📤 Syncing GitHub files → HF Space (rsync)" | |
| rsync -av --delete --exclude=".git" ./ hf-space/ || true | |
| cd hf-space | |
| echo "📌 Committing changes" | |
| git add . | |
| git commit -m "Sync from GitHub on master ($(date))" || echo "No changes" | |
| echo "⬆️ Pushing to Hugging Face Space (main branch)" | |
| git push https://codeninja3d:${HF_TOKEN}@huggingface.co/spaces/codeninja3d/agentctl HEAD:main | |
| echo "🎉 Sync complete!" | |