nielsr HF Staff commited on
Commit
0868eda
·
1 Parent(s): 3c125e9

Add Github action

Browse files
Files changed (1) hide show
  1. .github/workflows/deploy-to-hf.yml +28 -0
.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