soutrik commited on
Commit
48e5880
·
1 Parent(s): d5d95b5

added: only hf deployment pipeline

Browse files
Files changed (1) hide show
  1. .github/workflows/hf_deploy.yaml +60 -0
.github/workflows/hf_deploy.yaml ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face Hub
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - feat/litserve_gpu_gradio
8
+ jobs:
9
+ sync-to-hub:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ with:
14
+ fetch-depth: 0
15
+ lfs: true
16
+
17
+ - name: Install Git LFS
18
+ run: |
19
+ curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
20
+ sudo apt-get install git-lfs
21
+ git lfs install
22
+ git lfs pull
23
+
24
+ - name: Add remote
25
+ run: |
26
+ git remote add space https://$USER:[email protected]/spaces/$USER/$SPACE
27
+ env:
28
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
29
+ USER: soutrik
30
+ SPACE: gradio_demo
31
+
32
+ - name: Add README.md
33
+ run: |
34
+ cat <<EOF > README.md
35
+ ---
36
+ title: My Gradio App
37
+ emoji: 🚀
38
+ colorFrom: blue
39
+ colorTo: green
40
+ sdk: gradio
41
+ sdk_version: "5.7.1"
42
+ app_file: app.py
43
+ pinned: false
44
+ ---
45
+ EOF
46
+
47
+ - name: Configure Git identity
48
+ run: |
49
+ git config user.name "soutrik"
50
+ git config user.email "[email protected]"
51
+
52
+ - name: Push to hub
53
+ run: |
54
+ git add README.md
55
+ git commit -m "Add README.md"
56
+ git push --force https://$USER:[email protected]/spaces/$USER/$SPACE main
57
+ env:
58
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
59
+ USER: soutrik
60
+ SPACE: gradio_demo