name: Deploy Backend to Hugging Face on: push: branches: - main paths: - 'app.py' - 'requirements.txt' - 'backend/**' - 'uploads/**' - '.github/workflows/deploy-huggingface.yml' workflow_dispatch: jobs: deploy: name: Deploy Backend runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 lfs: true - name: Configure Git run: | git config --global user.name "github-actions[bot]" git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - name: Deploy backend to Hugging Face env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | git push https://Sivaneshakumar:${HF_TOKEN}@huggingface.co/spaces/Sivaneshakumar/sanjeevani-api main --force