nilotpaldhar2004 commited on
Commit
126cf83
·
unverified ·
1 Parent(s): 500f8a9

Update HuggingFace token and user details in workflow

Browse files
Files changed (1) hide show
  1. .github/workflows/sync-to-hf.yml +30 -0
.github/workflows/sync-to-hf.yml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to HuggingFace Space
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main # triggers on every push to main
7
+
8
+ jobs:
9
+ sync-to-hf:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Checkout GitHub repo
14
+ uses: actions/checkout@v3
15
+ with:
16
+ fetch-depth: 0 # full history needed for HF sync
17
+ lfs: true # if you ever add large files
18
+
19
+ - name: Push to HuggingFace Space
20
+ env:
21
+ HF_TOKEN: ${{ secrets.HF_TOKENG }}
22
+ run: |
23
+ git config --global user.email "dharnilotpal31@gmail.com"
24
+ git config --global user.name "nilotpaldhar2004"
25
+
26
+ # Add HuggingFace remote
27
+ git remote add hf https://nilotpaldhar2004:$HF_TOKEN@huggingface.co/spaces/nilotpaldhar2004/text2sql-chatbot
28
+
29
+ # Force push to HF (HF requires this for Space sync)
30
+ git push hf main --force