うみゅ commited on
Commit
e69a2db
·
unverified ·
1 Parent(s): 83b3608

Update deploy.yml

Browse files
Files changed (1) hide show
  1. .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
- deployment:
8
  runs-on: ubuntu-latest
9
  environment: production
10
  steps:
11
- - name: Checkout repository
12
- uses: actions/checkout@main
13
-
14
- - name: Set remote URL
15
- run: git remote set-url origin ${{ secrets.PRODUCTION_SERVER }}
 
 
 
16
 
17
- - name: Pull from main
18
- run: git pull origin main
19
-
20
- - name: Push to main
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