Spaces:
Sleeping
Sleeping
Add CI/CD deploy to HF Spaces
Browse files- .github/workflows/deploy.yml +8 -12
.github/workflows/deploy.yml
CHANGED
|
@@ -1,23 +1,19 @@
|
|
| 1 |
-
name: Deploy to Hugging Face
|
| 2 |
|
| 3 |
on:
|
| 4 |
push:
|
| 5 |
-
branches:
|
|
|
|
| 6 |
|
| 7 |
jobs:
|
| 8 |
deploy:
|
| 9 |
runs-on: ubuntu-latest
|
| 10 |
-
|
| 11 |
steps:
|
| 12 |
-
-
|
| 13 |
-
uses: actions/checkout@v3
|
| 14 |
-
|
| 15 |
-
- name: Set up Git config
|
| 16 |
-
run: |
|
| 17 |
-
git config --global user.name "nls-forev"
|
| 18 |
-
git config --global user.email "rj07605@gmail.com"
|
| 19 |
|
| 20 |
-
- name: Push to Hugging Face
|
| 21 |
run: |
|
| 22 |
-
git
|
|
|
|
|
|
|
| 23 |
git push hf main --force
|
|
|
|
| 1 |
+
name: Deploy to Hugging Face Space
|
| 2 |
|
| 3 |
on:
|
| 4 |
push:
|
| 5 |
+
branches:
|
| 6 |
+
- main
|
| 7 |
|
| 8 |
jobs:
|
| 9 |
deploy:
|
| 10 |
runs-on: ubuntu-latest
|
|
|
|
| 11 |
steps:
|
| 12 |
+
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
+
- name: Push to Hugging Face Spaces
|
| 15 |
run: |
|
| 16 |
+
git config --global user.email "you@example.com"
|
| 17 |
+
git config --global user.name "Your Name"
|
| 18 |
+
git remote add hf https://klasta:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/Klasta/testing_spaces || true
|
| 19 |
git push hf main --force
|