name: Deploy to HuggingFace Space on: push: branches: [ main ] tags: - 'v*' workflow_dispatch: jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 0 lfs: true - name: Push to HuggingFace Space env: HF_TOKEN: ${{ secrets.HF_TOKEN }} HF_SPACE_NAME: ${{ secrets.HF_SPACE_NAME }} run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" git push https://user:$HF_TOKEN@huggingface.co/spaces/$HF_SPACE_NAME main:main --force - name: Deployment Status run: | echo "✅ Deployed to: https://huggingface.co/spaces/${{ secrets.HF_SPACE_NAME }}"