Uday Chitragar commited on
Commit
401b59d
·
2 Parent(s): e9e83f7 86177fd

Merge branch 'main' of https://github.com/ucKaizen/mlflow_llm

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +14 -22
.github/workflows/main.yml CHANGED
@@ -1,31 +1,23 @@
1
- name: Deploy to Hugging Face
2
-
3
  on:
4
  push:
5
- branches:
6
- - main
7
 
8
  jobs:
9
- deploy:
10
  runs-on: ubuntu-latest
11
-
12
  steps:
13
- - name: Checkout code
14
- uses: actions/checkout@v2
15
-
16
- - name: Set up Python
17
- uses: actions/setup-python@v2
18
  with:
19
- python-version: '3.x'
20
-
21
- - name: Install dependencies
22
- run: |
23
- find .
24
- pip install -r requirements.txt
25
-
26
- - name: Upload model to Hugging Face
27
  run: |
28
- hf upload ./app.py
 
29
  env:
30
- HF_HOME: ${{ github.workspace }}/iris_log_reg_model
31
- HUGGINGFACE_TOKEN: ${{ secrets.HF }}
 
 
1
+ name: Sync to Hugging Face hub
 
2
  on:
3
  push:
4
+ branches: [main]
5
+ workflow_dispatch:
6
 
7
  jobs:
8
+ sync-to-hub:
9
  runs-on: ubuntu-latest
 
10
  steps:
11
+ - uses: actions/checkout@v2
 
 
 
 
12
  with:
13
+ fetch-depth: 0
14
+ - name: Add remote
15
+ env:
16
+ HF_TOKEN: ${{ secrets.HG }}
 
 
 
 
17
  run: |
18
+ git remote add space https://ucindia:$HF_TOKEN@huggingface.co/spaces/ucindia/iris_log_reg_model
19
+ - name: Push to hub
20
  env:
21
+ HF_TOKEN: ${{ secrets.HG }}
22
+ run: |
23
+ git push --force space main