Spaces:
Running
Running
| name: Deploy to Hugging Face Space | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| workflow_dispatch: | |
| jobs: | |
| sync-to-space: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| lfs: true | |
| - name: Setup Git LFS | |
| run: | | |
| git lfs install | |
| git lfs fetch --all | |
| git lfs checkout | |
| - name: Push to Hugging Face Space | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| HF_SPACE: Nileshka/fusechain-backend | |
| run: | | |
| git config --global user.email "actions@github.com" | |
| git config --global user.name "github-actions" | |
| # Build a single-commit snapshot from current master contents | |
| git checkout --orphan hf-snapshot | |
| git add -A | |
| git commit -m "Deploy snapshot" | |
| # Push that snapshot to the Space's main branch | |
| git push https://user:$HF_TOKEN@huggingface.co/spaces/$HF_SPACE hf-snapshot:main --force | |