Rajeev-86 commited on
Commit
b4d2f6b
·
1 Parent(s): 82e3da2

added .github workflows and .gitgnore

Browse files
Files changed (2) hide show
  1. .github/workflows/sync_to_hf.yml +24 -0
  2. .gitignore +3 -0
.github/workflows/sync_to_hf.yml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face Hub
2
+
3
+ on:
4
+ push:
5
+ branches: [main] # Trigger on pushes to the main branch
6
+ workflow_dispatch: # Allows manual trigger from the Actions tab
7
+
8
+ jobs:
9
+ sync-to-hub:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ with:
14
+ fetch-depth: 0 # Ensure all history is fetched
15
+ lfs: true # Needed if you use Git LFS for large files
16
+
17
+ - name: Push to Hugging Face Space
18
+ env:
19
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
20
+ HF_USERNAME: your_huggingface_username
21
+ SPACE_NAME: your_space_name
22
+ run: |
23
+ # The $HF_TOKEN is used as the password for authentication
24
+ git push -f https://${{ env.HF_USERNAME }}:${{ env.HF_TOKEN }}@huggingface.co/spaces/${{ env.HF_USERNAME }}/${{ env.SPACE_NAME }} main
.gitignore ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ venv/
2
+ env/
3
+ __pycache__/