sumityadav329 commited on
Commit
daa7e05
·
unverified ·
1 Parent(s): 1740a25

Update sync-to-hf.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/sync-to-hf.yml +13 -19
.github/workflows/sync-to-hf.yml CHANGED
@@ -1,26 +1,20 @@
1
- name: Sync to Hugging Face Spaces
2
 
3
  on:
4
  push:
5
- branches:
6
- - main # Trigger the workflow on pushes to the 'main' branch
 
 
7
 
8
  jobs:
9
- deploy:
10
  runs-on: ubuntu-latest
11
-
12
  steps:
13
- - name: Checkout Repository
14
- uses: actions/checkout@v3
15
-
16
- - name: Set up Git
17
- run: |
18
- git config --global user.email "[email protected]"
19
- git config --global user.name "Sumit Yadav"
20
-
21
- - name: Push to Hugging Face
22
- env:
23
- HF_TOKEN: ${{ secrets.HF_TOKEN }}
24
- run: |
25
- git remote add huggingface https://${{ secrets.HF_TOKEN }}@huggingface.co/spaces/sumityadav329/text-to-image-webapp
26
- git push huggingface main --force
 
1
+ name: Sync to Hugging Face hub
2
 
3
  on:
4
  push:
5
+ branches: [main]
6
+
7
+ # to run this workflow manually from the Actions tab
8
+ workflow_dispatch:
9
 
10
  jobs:
11
+ sync-to-hub:
12
  runs-on: ubuntu-latest
 
13
  steps:
14
+ - uses: actions/checkout@v2
15
+ with:
16
+ fetch-depth: 0
17
+ - name: Push to hub
18
+ env:
19
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
20
+ run: git push --force https://sumityadav329:$HF_TOKEN@huggingface.co/spaces/sumityadav329/text-to-image-webapp main