| name: Deploy to Hugging Face Space | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| jobs: | |
| sync-to-hub: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| lfs: true | |
| - name: Push to hub | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| HF_USERNAME: vivek1192 | |
| # REPLACE WITH YOUR SPACE NAME (e.g., my-private-space) | |
| SPACE_NAME: detectAI | |
| run: | | |
| git config --global user.email "bot@github.com" | |
| git config --global user.name "GitHub Actions Bot" | |
| # Push to the main branch of the space | |
| git push -f https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME develop:main | |