Spaces:
Sleeping
Sleeping
うみゅ
commited on
Update deploy.yml
Browse files- .github/workflows/deploy.yml +14 -11
.github/workflows/deploy.yml
CHANGED
@@ -2,20 +2,23 @@ name: "Deploy"
|
|
2 |
on:
|
3 |
push:
|
4 |
branches: [ "main" ]
|
|
|
5 |
|
6 |
jobs:
|
7 |
-
|
8 |
runs-on: ubuntu-latest
|
9 |
environment: production
|
10 |
steps:
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
run: git push origin main
|
|
|
2 |
on:
|
3 |
push:
|
4 |
branches: [ "main" ]
|
5 |
+
workflow_dispatch:
|
6 |
|
7 |
jobs:
|
8 |
+
sync-to-hub:
|
9 |
runs-on: ubuntu-latest
|
10 |
environment: production
|
11 |
steps:
|
12 |
+
- uses: actions/checkout@v3
|
13 |
+
with:
|
14 |
+
fetch-depth: 0
|
15 |
+
lfs: true
|
16 |
+
- name: Set remote URL
|
17 |
+
env:
|
18 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
19 |
+
run: git remote set-url origin ${{ secrets.PRODUCTION_SERVER }}
|
20 |
|
21 |
+
- name: Push to hub
|
22 |
+
env:
|
23 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
24 |
+
run: git push ${{ secrets.PRODUCTION_SERVER }} main
|
|