Spaces:
Build error
Build error
Commit
·
9005064
1
Parent(s):
98db479
require
Browse files- .github/workflows/ci-cd.yml +11 -0
.github/workflows/ci-cd.yml
CHANGED
|
@@ -30,7 +30,18 @@ jobs:
|
|
| 30 |
|
| 31 |
- name: Run Tests
|
| 32 |
run: python scripts/test.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
|
|
|
|
|
|
|
|
|
| 34 |
- name: Upload Model Artifacts
|
| 35 |
#uses: actions/upload-artifact@v3
|
| 36 |
uses: actions/upload-artifact@v4
|
|
|
|
| 30 |
|
| 31 |
- name: Run Tests
|
| 32 |
run: python scripts/test.py
|
| 33 |
+
|
| 34 |
+
- name: Deploy to Hugging Face
|
| 35 |
+
env:
|
| 36 |
+
HF_TOKEN: ${{ secrets.HUGGINGFACE_API_TOKEN }}
|
| 37 |
+
run: |
|
| 38 |
+
huggingface-cli login --token $HF_TOKEN
|
| 39 |
+
# Set merge strategy to rebase
|
| 40 |
+
git config pull.rebase true
|
| 41 |
|
| 42 |
+
# Ensure local repository is up-to-date before pushing
|
| 43 |
+
git push --force https://danielle2003:$HF_TOKEN@huggingface.co/spaces/danielle2003/sentiment main
|
| 44 |
+
|
| 45 |
- name: Upload Model Artifacts
|
| 46 |
#uses: actions/upload-artifact@v3
|
| 47 |
uses: actions/upload-artifact@v4
|