Spaces:
Sleeping
Sleeping
updated actions for string repo name in secrests
Browse files
.github/workflows/sync_to_huggingface.yml
CHANGED
@@ -2,15 +2,21 @@ name: Sync to Hugging Face hub
|
|
2 |
|
3 |
on:
|
4 |
push:
|
5 |
-
branches:
|
6 |
-
|
|
|
|
|
7 |
|
8 |
jobs:
|
9 |
sync-to-hub:
|
10 |
runs-on: ubuntu-latest
|
11 |
steps:
|
12 |
- name: Checkout code
|
13 |
-
uses: actions/checkout@
|
|
|
|
|
|
|
|
|
14 |
|
15 |
- name: Configure Git
|
16 |
env:
|
@@ -19,18 +25,9 @@ jobs:
|
|
19 |
run: |
|
20 |
git config user.name $USER_NAME
|
21 |
git config user.email $USER_EMAIL
|
22 |
-
|
23 |
- name: Push to hub
|
24 |
env:
|
25 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
26 |
-
HF_REPO_CLONE_URL: ${{ secrets.HF_REPO_CLONE_URL }}
|
27 |
run: |
|
28 |
-
|
29 |
-
# Add the Hugging Face remote with the correct URL
|
30 |
-
git remote add hub $HF_REPO_CLONE_URL
|
31 |
-
|
32 |
-
# Fetch the remote repository
|
33 |
-
git fetch hub
|
34 |
-
|
35 |
-
# Push to the 'main' branch forcefully
|
36 |
-
git push --force hub main
|
|
|
2 |
|
3 |
on:
|
4 |
push:
|
5 |
+
branches: [main]
|
6 |
+
|
7 |
+
# to run this workflow manually from the Actions tab
|
8 |
+
workflow_dispatch:
|
9 |
|
10 |
jobs:
|
11 |
sync-to-hub:
|
12 |
runs-on: ubuntu-latest
|
13 |
steps:
|
14 |
- name: Checkout code
|
15 |
+
uses: actions/checkout@v3
|
16 |
+
with:
|
17 |
+
# Disabling shallow clone is recommended for improving relevancy of
|
18 |
+
# commitlint and git log checks
|
19 |
+
fetch-depth: 0
|
20 |
|
21 |
- name: Configure Git
|
22 |
env:
|
|
|
25 |
run: |
|
26 |
git config user.name $USER_NAME
|
27 |
git config user.email $USER_EMAIL
|
28 |
+
|
29 |
- name: Push to hub
|
30 |
env:
|
31 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
|
|
32 |
run: |
|
33 |
+
git push --force https://anurag629:[email protected]/spaces/anurag629/botaniscan main
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|