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 }}