Spaces:
Sleeping
Sleeping
Download .github/workflows/deploy.yml from GSoumyajit2005/invoice-processor-ml: direct link, hf CLI and curl.
- Browser
- Download file 981 Bytes
-
https://huggingface.co/spaces/GSoumyajit2005/invoice-processor-ml/resolve/main/.github/workflows/deploy.yml
- Command line
-
hf download hf://spaces/GSoumyajit2005/invoice-processor-ml/.github/workflows/deploy.yml
-
curl -L -o deploy.yml https://huggingface.co/spaces/GSoumyajit2005/invoice-processor-ml/resolve/main/.github/workflows/deploy.yml
981 Bytes
| name: Sync to Hugging Face Spaces | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| sync-to-hub: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout GitHub Code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| lfs: true # Explicitly enable LFS fetching | |
| - name: Push to Hugging Face | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| HF_USERNAME: GSoumyajit2005 | |
| SPACE_NAME: invoice-processor-ml | |
| run: | | |
| # 1. Configure Git | |
| git config --global user.email "actions@github.com" | |
| git config --global user.name "GitHub Actions" | |
| # 2. Add Remote | |
| git remote add space https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME | |
| # 3. Force Push (Overwrite HF with GitHub's clean version) | |
| # We skip the fetch/merge steps because we want GitHub to be the source of truth | |
| git push space main --force |