Spaces:
Running
Running
Fix publish hf
Browse files- .github/workflows/main.yml +14 -1
.github/workflows/main.yml
CHANGED
@@ -63,6 +63,8 @@ jobs:
|
|
63 |
steps:
|
64 |
- name: Checkout
|
65 |
uses: actions/checkout@v4
|
|
|
|
|
66 |
|
67 |
- name: Set up Python
|
68 |
uses: actions/setup-python@v5
|
@@ -73,9 +75,20 @@ jobs:
|
|
73 |
run: |
|
74 |
pip install huggingface_hub
|
75 |
|
|
|
|
|
|
|
|
|
|
|
76 |
- name: Push to Hugging Face
|
77 |
env:
|
78 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
79 |
run: |
|
80 |
huggingface-cli login --token $HF_TOKEN
|
81 |
-
git
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
steps:
|
64 |
- name: Checkout
|
65 |
uses: actions/checkout@v4
|
66 |
+
with:
|
67 |
+
fetch-depth: 0
|
68 |
|
69 |
- name: Set up Python
|
70 |
uses: actions/setup-python@v5
|
|
|
75 |
run: |
|
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
|
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 hf main
|