gagan0716's picture
Upload folder using huggingface_hub
a67c2e8 verified
Raw
History Blame Contribute Delete
946 Bytes
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 }}