github Action
Browse files- .github/workflows/deploy-huggingface-space.yml +30 -0
- .gitignore +1 -0
.github/workflows/deploy-huggingface-space.yml
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Deploy Hugging Face Space
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- main
|
| 7 |
+
workflow_dispatch:
|
| 8 |
+
|
| 9 |
+
concurrency:
|
| 10 |
+
group: deploy-huggingface-space
|
| 11 |
+
cancel-in-progress: true
|
| 12 |
+
|
| 13 |
+
jobs:
|
| 14 |
+
deploy:
|
| 15 |
+
runs-on: ubuntu-latest
|
| 16 |
+
steps:
|
| 17 |
+
- uses: actions/checkout@v4
|
| 18 |
+
with:
|
| 19 |
+
fetch-depth: 0
|
| 20 |
+
lfs: true
|
| 21 |
+
persist-credentials: false
|
| 22 |
+
|
| 23 |
+
- name: Push to Hugging Face Space
|
| 24 |
+
env:
|
| 25 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 26 |
+
run: |
|
| 27 |
+
git config user.name "github-actions[bot]"
|
| 28 |
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
| 29 |
+
git remote add huggingface "https://oauth2:${HF_TOKEN}@huggingface.co/spaces/q6/P2"
|
| 30 |
+
git push --force huggingface HEAD:main
|
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.?
|