JDFPalladium commited on
Commit
cc847df
·
1 Parent(s): 3cc12ca

Update main.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +10 -12
.github/workflows/main.yml CHANGED
@@ -31,21 +31,19 @@ jobs:
31
  needs: lint-and-format
32
  runs-on: ubuntu-latest
33
  steps:
34
- - name: Checkout repository
35
  uses: actions/checkout@v3
 
 
36
 
37
- - name: Install Git
38
- run: sudo apt-get install git -y
39
-
40
- - name: Push to Hugging Face Space
41
- env:
42
- HF_TOKEN: ${{ secrets.HF_TOKEN }}
43
  run: |
44
  git config --global user.email "actions@github.com"
45
- git config --global user.name "Github Actions"
46
- git clone "https://${HF_TOKEN}@huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME" hf-space
47
- rsync -av --exclude='.git' ./ hf-space/
48
- cd hf-space
49
- git add .
 
50
  git commit -m "Update Gradio app" || echo "No changes to commit"
51
  git push
 
31
  needs: lint-and-format
32
  runs-on: ubuntu-latest
33
  steps:
34
+ - name: Checkout full history
35
  uses: actions/checkout@v3
36
+ with:
37
+ fetch-depth: 0 # Avoid shallow clone
38
 
39
+ - name: Set up Git
 
 
 
 
 
40
  run: |
41
  git config --global user.email "actions@github.com"
42
+ git config --global user.name "GitHub Actions"
43
+
44
+ - name: Push to Hugging Face
45
+ run: |
46
+ git remote add hf https://USERNAME:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/Nishauri/ClinicianAssistant
47
+ git push hf main --force
48
  git commit -m "Update Gradio app" || echo "No changes to commit"
49
  git push