Commit
·
521ecd6
1
Parent(s):
3004bde
ci: Avoiding copying on the same folder
Browse files
.github/workflows/push_to_hf.yml
CHANGED
@@ -10,16 +10,19 @@ jobs:
|
|
10 |
runs-on: ubuntu-latest
|
11 |
|
12 |
steps:
|
13 |
-
- name: Checkout repository
|
14 |
uses: actions/checkout@v3
|
|
|
|
|
15 |
|
16 |
- name: Clone Hugging Face repository with token
|
17 |
env:
|
18 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
|
|
19 |
run: |
|
20 |
-
git clone https://${{
|
21 |
-
|
22 |
-
|
23 |
git add .
|
24 |
git commit -m "Update from main branch"
|
25 |
git push origin main
|
|
|
10 |
runs-on: ubuntu-latest
|
11 |
|
12 |
steps:
|
13 |
+
- name: Checkout GitHub repository
|
14 |
uses: actions/checkout@v3
|
15 |
+
with:
|
16 |
+
path: github_repo # Change 'github_repo' to the desired directory name for the GitHub repo
|
17 |
|
18 |
- name: Clone Hugging Face repository with token
|
19 |
env:
|
20 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
21 |
+
HF_USERNAME: ${{ secrets.HF_USERNAME }}
|
22 |
run: |
|
23 |
+
git clone https://${{ env.HF_USERNAME }}:${{ env.HF_TOKEN }}@huggingface.co/spaces/SDSC/digiwild hf_repo
|
24 |
+
rsync -av --exclude='hf_repo' github_repo/ hf_repo/
|
25 |
+
cd hf_repo
|
26 |
git add .
|
27 |
git commit -m "Update from main branch"
|
28 |
git push origin main
|