| name: Deploy to Hugging Face Space | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure Git | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Add Hugging Face remote | |
| run: | | |
| git remote add space https://jdsb06:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/jdsb06/meta-r2 || git remote set-url space https://jdsb06:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/jdsb06/meta-r2 | |
| - name: Push to Hugging Face Space | |
| run: | | |
| git push space main | |