Spaces:
Sleeping
Sleeping
| name: Sync to HF Spaces | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Verify dist/ exists | |
| run: | | |
| ls dist/assets/ || (echo "ERROR: dist/ not found in repo" && exit 1) | |
| echo "dist/ contents:" | |
| ls -lh dist/assets/ | |
| - name: Push to HF Spaces | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| run: | | |
| git config user.email "ci@glbstudio.dev" | |
| git config user.name "GLB Deploy" | |
| git remote add hf \ | |
| "https://varunm2004:${HF_TOKEN}@huggingface.co/spaces/varunm2004/glb-studio" \ | |
| 2>/dev/null || \ | |
| git remote set-url hf \ | |
| "https://varunm2004:${HF_TOKEN}@huggingface.co/spaces/varunm2004/glb-studio" | |
| git push hf HEAD:main --force | |
| echo "✅ Deployed to https://huggingface.co/spaces/varunm2004/glb-studio" | |