name: Deploy to Hugging Face Space on: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Deploy to Hugging Face Space env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | git config --global user.email "action@github.com" git config --global user.name "GitHub Action" git remote remove hf || true # Good practice to ensure a clean state git remote add hf https://user:${HF_TOKEN}@huggingface.co/spaces/Klasta/testing_spaces git push hf main --force