Bashir Gulistani commited on
Commit
e0f8159
·
unverified ·
1 Parent(s): edd88c3

Update deploy.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/deploy.yml +11 -8
.github/workflows/deploy.yml CHANGED
@@ -7,17 +7,20 @@ on:
7
  workflow_dispatch:
8
 
9
  jobs:
10
- sync-to-hub:
11
  runs-on: ubuntu-latest
12
  steps:
13
- - uses: actions/checkout@v3
14
- with:
15
- fetch-depth: 0
16
- lfs: true
17
 
18
- - name: Push to Hugging Face Space
 
 
 
 
 
19
  env:
20
- CASE_STUDY_1_SECRET: ${{ secrets.CASE_STUDY_1_SECRET }}
21
  run: |
22
  git remote add space https://huggingface.co/spaces/BashirG/dis-background-removal-duplicated
23
- git push --force space main
 
7
  workflow_dispatch:
8
 
9
  jobs:
10
+ push-to-huggingface:
11
  runs-on: ubuntu-latest
12
  steps:
13
+ - name: Checkout repository
14
+ uses: actions/checkout@v3
 
 
15
 
16
+ - name: Set up Git user
17
+ run: |
18
+ git config --global user.email "you@example.com"
19
+ git config --global user.name "Your Name"
20
+
21
+ - name: Add Hugging Face remote and push to Spaces
22
  env:
23
+ HF_TOKEN: ${{ secrets.CASE_STUDY_1_SECRET }} # Use the stored Hugging Face token
24
  run: |
25
  git remote add space https://huggingface.co/spaces/BashirG/dis-background-removal-duplicated
26
+ git push --force "https://huggingface.co:${HF_TOKEN}@huggingface.co/spaces/BashirG/dis-background-removal-duplicated" main