mhdzumair commited on
Commit
bfd1741
1 Parent(s): 59af345

Update main.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +9 -4
.github/workflows/main.yml CHANGED
@@ -76,19 +76,24 @@ jobs:
76
  pip install huggingface_hub
77
 
78
  - name: Configure Git
 
 
 
79
  run: |
80
- git config --global user.email "[email protected]"
81
- git config --global user.name "Mohamed Zumair"
 
82
 
83
  - name: Push to Hugging Face
84
  env:
85
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
86
  run: |
87
- huggingface-cli login --token $HF_TOKEN --add-to-git-credential
 
88
  git remote add hf https://huggingface.co/spaces/mhdzumair/mediaflow-proxy
89
  git fetch hf
90
  git checkout -b main || git checkout main
91
  git pull hf main --rebase || true
92
  git add .
93
  git commit -m "Update to version ${{ github.ref_name }}" || echo "No changes to commit"
94
- git push https://[email protected]/spaces/mhdzumair/mediaflow-proxy main
 
76
  pip install huggingface_hub
77
 
78
  - name: Configure Git
79
+ env:
80
+ GIT_NAME: ${{ secrets.GIT_NAME }}
81
+ GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
82
  run: |
83
+ git config --global user.name "$GIT_NAME"
84
+ git config --global user.email "$GIT_EMAIL"
85
+ git config --global credential.helper store
86
 
87
  - name: Push to Hugging Face
88
  env:
89
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
90
  run: |
91
+ echo "machine huggingface.co login $HF_TOKEN" > ~/.netrc
92
+ chmod 600 ~/.netrc
93
  git remote add hf https://huggingface.co/spaces/mhdzumair/mediaflow-proxy
94
  git fetch hf
95
  git checkout -b main || git checkout main
96
  git pull hf main --rebase || true
97
  git add .
98
  git commit -m "Update to version ${{ github.ref_name }}" || echo "No changes to commit"
99
+ git push hf main