Spaces:
Running
Running
Create .github/workflows/depoly.yml
Browse files- .github/workflows/depoly.yml +35 -0
.github/workflows/depoly.yml
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Deploy to Hugging Face Spaces
|
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@v3
|
16 |
+
with:
|
17 |
+
fetch-depth: 0
|
18 |
+
lfs: true
|
19 |
+
|
20 |
+
- name: Set up Python
|
21 |
+
uses: actions/setup-python@v3
|
22 |
+
with:
|
23 |
+
python-version: '3.8'
|
24 |
+
|
25 |
+
- name: Install dependencies
|
26 |
+
run: |
|
27 |
+
python -m pip install --upgrade pip
|
28 |
+
pip install -r requirements.txt
|
29 |
+
|
30 |
+
- name: Push to Hugging Face Spaces
|
31 |
+
env:
|
32 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
33 |
+
run: |
|
34 |
+
git remote add space https://huggingface.co/spaces/HF_USERNAME/SPACE_NAME
|
35 |
+
git push https://HF_USERNAME:${HF_TOKEN}@huggingface.co/spaces/HF_USERNAME/SPACE_NAME main
|