name: Deploy to Hugging Face Spaces on: workflow_dispatch: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 lfs: true - name: Configure Git LFS run: git lfs install - name: Push to Hugging Face Space env: HF_TOKEN: ${{ secrets.HF_TOKEN }} HF_SPACE_ID: ${{ secrets.HF_SPACE_ID }} run: | git config user.email "github-actions[bot]@users.noreply.github.com" git config user.name "github-actions[bot]" git remote add space "https://user:${HF_TOKEN}@huggingface.co/spaces/${HF_SPACE_ID}" git push --force space HEAD:main