UdasriHasindu commited on
Commit
4e8a9e5
·
1 Parent(s): bcbc643

actions: deploy on HF space

Browse files
Files changed (2) hide show
  1. .github/workflows/deploy.yml +34 -0
  2. README.md +15 -0
.github/workflows/deploy.yml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Deploy to Hugging Face Space
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ deploy:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: Checkout repository
15
+ uses: actions/checkout@v4
16
+ with:
17
+ fetch-depth: 0
18
+
19
+ - name: Push to Hugging Face Space
20
+ env:
21
+ HF_USERNAME: Udasri
22
+ HF_SPACE_NAME: uh.info
23
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
24
+ run: |
25
+ if [ -z "$HF_TOKEN" ]; then
26
+ echo "HF_TOKEN secret is missing."
27
+ exit 1
28
+ fi
29
+
30
+ git config --global user.name "github-actions[bot]"
31
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
32
+
33
+ git remote add space "https://Udasri:${HF_TOKEN}@huggingface.co/spaces/${HF_USERNAME}/${HF_SPACE_NAME}"
34
+ git push --force space HEAD:main
README.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: UH Info API
3
+ emoji: 🤖
4
+ colorFrom: indigo
5
+ colorTo: blue
6
+ sdk: docker
7
+ pinned: false
8
+ ---
9
+
10
+ FastAPI + RAG app for answering questions about personal info
11
+
12
+ ## Endpoints
13
+
14
+ - `GET /`
15
+ - `POST /ask`