feat(scan): multi-garment detection — detect and save all items from … #34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy backend to HuggingFace Spaces | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'backend/**' | |
| - 'scripts/push-hf.sh' | |
| - '.github/workflows/deploy-hf.yml' | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Check HF_TOKEN secret | |
| run: | | |
| if [ -z "${{ secrets.HF_TOKEN }}" ]; then | |
| echo "❌ HF_TOKEN secret is not set." | |
| echo "Go to: GitHub repo → Settings → Secrets and variables → Actions → New repository secret" | |
| echo "Name: HF_TOKEN | Value: your HuggingFace write token (huggingface.co/settings/tokens)" | |
| exit 1 | |
| fi | |
| echo "✓ HF_TOKEN is set" | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| lfs: true | |
| - 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: Install Git LFS | |
| run: git lfs install --system | |
| - name: Add HuggingFace remote (with token) | |
| run: | | |
| git remote add hf-space https://oauth2accesstoken:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/rizzvision69/app-v2-space | |
| - name: Deploy to HuggingFace Spaces | |
| run: bash scripts/push-hf.sh hf-space |