Kunal Kurve commited on
Commit
74ddda8
·
1 Parent(s): b741049

Create main.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +35 -0
.github/workflows/main.yml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face hub
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ sync-to-hub:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ with:
16
+ fetch-depth: 0
17
+ lfs: true
18
+
19
+ - name: Set up Git
20
+ run: |
21
+ git config --global user.email "[email protected]"
22
+ git config --global user.name "GitHub Actions"
23
+
24
+ - name: Pull from Hugging Face Hub
25
+ env:
26
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
27
+ run: |
28
+ git remote add hf https://kunalkurve:[email protected]/spaces/kunalkurve/CodeGuru-aCodellamaApp
29
+ git fetch hf
30
+ git rebase hf/main
31
+
32
+ - name: Push to hub
33
+ env:
34
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
35
+ run: git push https://kunalkurve:[email protected]/spaces/kunalkurve/CodeGuru-aCodellamaApp main