Create .github/workflows/deploy.ym
Browse files- .github/workflows/deploy.ym +18 -0
.github/workflows/deploy.ym
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Deploy to Hugging Face
|
| 2 |
+
on:
|
| 3 |
+
push:
|
| 4 |
+
branches: [main]
|
| 5 |
+
pull_request:
|
| 6 |
+
branches: [main]
|
| 7 |
+
|
| 8 |
+
jobs:
|
| 9 |
+
deploy:
|
| 10 |
+
runs-on: ubuntu-latest
|
| 11 |
+
steps:
|
| 12 |
+
- uses: actions/checkout@v3
|
| 13 |
+
- name: Deploy to Hugging Face
|
| 14 |
+
env:
|
| 15 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 16 |
+
run: |
|
| 17 |
+
pip install huggingface_hub
|
| 18 |
+
huggingface-cli upload ${{ secrets.HF_USERNAME }}/${{ secrets.HF_SPACE }} ./ --include="*.py" --include="*.txt" --include="*.md" --message "Deploy: ${{ github.sha }}"
|