Spaces:
Running
Running
| name: π Deploy to HuggingFace Spaces | |
| on: | |
| push: | |
| branches: | |
| - main # Deploy on every push to main | |
| workflow_dispatch: # Allow manual trigger from GitHub UI | |
| jobs: | |
| deploy-to-huggingface: | |
| name: Push to HuggingFace Space | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: β Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Full history needed for HF sync | |
| lfs: true # Support Git LFS if used | |
| - name: π€ Push to HuggingFace Space | |
| uses: huggingface/huggingface_hub-action@v1 | |
| with: | |
| # Store your HF token as a GitHub Secret: | |
| # GitHub repo β Settings β Secrets β Actions β New secret | |
| # Name: HF_TOKEN Value: hf_xxxxxxxxxxxx (Write access token) | |
| hf_token: ${{ secrets.HF_TOKEN }} | |
| space_id: gagan0716/stockforge-ocr | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |