Spaces:
Paused
Paused
| name: Sync to Hugging Face Space | |
| on: | |
| push: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Configure Git | |
| run: | | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "GitHub Actions Bot" | |
| - name: Push clean snapshot to Hugging Face Space (MAIN branch) | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| run: | | |
| set -e | |
| echo "π Creating clean deploy snapshot" | |
| git checkout --orphan hf-clean | |
| git rm -rf . || true | |
| git checkout main -- . | |
| git add . | |
| git commit -m "Clean deploy to HF Space" | |
| git push https://user:${HF_TOKEN}@huggingface.co/spaces/Arko007/chest-disease hf-clean:main --force | |
| echo "β Deployed to HF Space main branch" | |