Spaces:
Running
Running
Commit
·
c07916d
1
Parent(s):
3d58595
fix: update GitHub Actions workflow to include HF_USERNAME and adjust remote URL configuration
Browse files
.github/workflows/Push_to_hf.yaml
CHANGED
@@ -5,6 +5,9 @@ on:
|
|
5 |
branches:
|
6 |
- main
|
7 |
|
|
|
|
|
|
|
8 |
jobs:
|
9 |
sync-to-space:
|
10 |
runs-on: ubuntu-latest
|
@@ -16,8 +19,10 @@ jobs:
|
|
16 |
- name: Push to Space
|
17 |
env:
|
18 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
|
|
19 |
run: |
|
20 |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
21 |
git config --global user.name "github-actions[bot]"
|
22 |
-
git remote
|
|
|
23 |
git push origin main || (git branch -M main && git push -f origin main)
|
|
|
5 |
branches:
|
6 |
- main
|
7 |
|
8 |
+
permissions:
|
9 |
+
contents: write
|
10 |
+
|
11 |
jobs:
|
12 |
sync-to-space:
|
13 |
runs-on: ubuntu-latest
|
|
|
19 |
- name: Push to Space
|
20 |
env:
|
21 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
22 |
+
HF_USERNAME: ${{ secrets.HF_USERNAME }}
|
23 |
run: |
|
24 |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
25 |
git config --global user.name "github-actions[bot]"
|
26 |
+
git remote remove origin || true
|
27 |
+
git remote add origin "https://${HF_USERNAME}:${HF_TOKEN}@huggingface.co/spaces/${HF_USERNAME}/CRAWL-GPT-CHAT"
|
28 |
git push origin main || (git branch -M main && git push -f origin main)
|