text2sql-chatbot / .github /workflows /sync-to-hf.yml
nilotpaldhar2004's picture
Update HuggingFace token and user details in workflow
126cf83 unverified
raw
history blame contribute delete
873 Bytes
name: Sync to HuggingFace Space
on:
push:
branches:
- main # triggers on every push to main
jobs:
sync-to-hf:
runs-on: ubuntu-latest
steps:
- name: Checkout GitHub repo
uses: actions/checkout@v3
with:
fetch-depth: 0 # full history needed for HF sync
lfs: true # if you ever add large files
- name: Push to HuggingFace Space
env:
HF_TOKEN: ${{ secrets.HF_TOKENG }}
run: |
git config --global user.email "dharnilotpal31@gmail.com"
git config --global user.name "nilotpaldhar2004"
# Add HuggingFace remote
git remote add hf https://nilotpaldhar2004:$HF_TOKEN@huggingface.co/spaces/nilotpaldhar2004/text2sql-chatbot
# Force push to HF (HF requires this for Space sync)
git push hf main --force