Shantanupathak94 commited on
Commit
65cfc5e
·
unverified ·
1 Parent(s): 52816f2

Update sync_to_hf.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/sync_to_hf.yml +29 -8
.github/workflows/sync_to_hf.yml CHANGED
@@ -1,8 +1,29 @@
1
- {
2
- "files": [
3
- {
4
- "path": ".github/workflows/sync_to_hf.yml",
5
- "content": "name: Sync to Hugging Face Hub\n\non:\n push:\n branches: [main]\n workflow_dispatch:\n\njobs:\n sync-to-hub:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v3\n with:\n fetch-depth: 0\n lfs: true\n - name: Push to Hugging Face Hub\n env:\n HF_TOKEN: ${{ secrets.HF_TOKEN }}\n HF_USER: \"shantanupathak94\"\n HF_SPACE: \"Ai-code-editor\"\n run: |\n git config --global user.email \"shantanupathak94@gmail.com\"\n git config --global user.name \"shantanu\"\n \n git remote add hf https://user:$HF_TOKEN@huggingface.co/spaces/$HF_USER/$HF_SPACE\n git push -f hf main\n"
6
- }
7
- ]
8
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face Hub
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ # Isse tum manually bhi button daba kar sync kar sakte ho
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ sync-to-hub:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout Code
14
+ uses: actions/checkout@v4 # Latest version
15
+ with:
16
+ fetch-depth: 0
17
+ lfs: true
18
+
19
+ - name: Push to Hugging Face
20
+ env:
21
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
22
+ run: |
23
+ # Git configuration
24
+ git config --global user.email "shantanupathak94@gmail.com"
25
+ git config --global user.name "shantanu"
26
+
27
+ # Force push to HF Space (shantanupathak94/Ai-code-editor)
28
+ git remote add hf https://shantanupathak94:$HF_TOKEN@huggingface.co/spaces/shantanupathak94/Ai-code-editor
29
+ git push --force hf main