name: Deploy to Hugging Face Space on: push: branches: - main jobs: deploy: runs-on: ubuntu-latest env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Configure Git run: | git config --global user.email "github-actions@github.com" git config --global user.name "GitHub Actions" - name: Add Hugging Face remote run: | git remote add hf https://${{ secrets.HF_USERNAME }}:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/${{ secrets.HF_USERNAME }}/${{ secrets.HF_SPACE_NAME }} - name: Push to Hugging Face run: | git push hf main --force