Spaces:
Running
Running
Add Github action
Browse files
.github/workflows/deploy-to-hf.yml
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Deploy to Hugging Face Space
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- main
|
| 7 |
+
workflow_dispatch: # Allow manual trigger
|
| 8 |
+
|
| 9 |
+
env:
|
| 10 |
+
# Configure your Hugging Face Space here (format: username/space-name)
|
| 11 |
+
HF_SPACE: nielsr/ai-deadlines-hub
|
| 12 |
+
|
| 13 |
+
jobs:
|
| 14 |
+
deploy:
|
| 15 |
+
runs-on: ubuntu-latest
|
| 16 |
+
|
| 17 |
+
steps:
|
| 18 |
+
- name: Checkout repository
|
| 19 |
+
uses: actions/checkout@v4
|
| 20 |
+
with:
|
| 21 |
+
fetch-depth: 0 # Fetch full history for proper git push
|
| 22 |
+
lfs: true
|
| 23 |
+
|
| 24 |
+
- name: Push to Hugging Face Space
|
| 25 |
+
env:
|
| 26 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 27 |
+
run: |
|
| 28 |
+
git push https://nielsr:$HF_TOKEN@huggingface.co/spaces/$HF_SPACE main --force
|