Eric0804 commited on
Commit
dbbf3e2
·
1 Parent(s): 0af97ff

Enable manual trigger for GitHub Action

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +10 -3
.github/workflows/main.yml CHANGED
@@ -1,23 +1,30 @@
1
  name: Sync to Hugging Face hub
 
2
  on:
3
  push:
4
  branches: [main]
5
-
6
- # to run this workflow manually from the Actions tab
7
  workflow_dispatch:
8
 
9
  jobs:
10
  sync-to-hub:
11
  runs-on: ubuntu-latest
 
12
  steps:
13
  - uses: actions/checkout@v2
14
  with:
15
  fetch-depth: 0
 
 
 
 
 
 
16
  - name: Add remote
17
  env:
18
  HF: ${{ secrets.HF }}
19
  run: git remote add space https://Eric0804:$HF@huggingface.co/spaces/Eric0804/text-to-image
 
20
  - name: Push to hub
21
  env:
22
  HF: ${{ secrets.HF }}
23
- run: git push --force https://Eric0804:$HF@huggingface.co/spaces/Eric0804/text-to-image main
 
1
  name: Sync to Hugging Face hub
2
+
3
  on:
4
  push:
5
  branches: [main]
 
 
6
  workflow_dispatch:
7
 
8
  jobs:
9
  sync-to-hub:
10
  runs-on: ubuntu-latest
11
+
12
  steps:
13
  - uses: actions/checkout@v2
14
  with:
15
  fetch-depth: 0
16
+
17
+ - name: Set Git identity
18
+ run: |
19
+ git config --global user.email "eric@example.com"
20
+ git config --global user.name "eric"
21
+
22
  - name: Add remote
23
  env:
24
  HF: ${{ secrets.HF }}
25
  run: git remote add space https://Eric0804:$HF@huggingface.co/spaces/Eric0804/text-to-image
26
+
27
  - name: Push to hub
28
  env:
29
  HF: ${{ secrets.HF }}
30
+ run: git push --force https://Eric0804:$HF@huggingface.co/spaces/Eric0804/text-to-image main