Abhinav Gavireddi commited on
Commit
cd56623
·
1 Parent(s): 04db7e0

fix: fixed error in deployment to HF

Browse files
Files changed (1) hide show
  1. .github/workflows/ci.yaml +18 -21
.github/workflows/ci.yaml CHANGED
@@ -7,26 +7,26 @@ on:
7
  branches: [ main ]
8
 
9
  jobs:
10
- build-and-test:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - name: Checkout repo
14
- uses: actions/checkout@v3
15
- - name: Set up Python
16
- uses: actions/setup-python@v4
17
- with:
18
- python-version: '3.10'
19
- - name: Install dependencies
20
- run: |
21
- python -m pip install --upgrade pip
22
- pip install -r requirements.txt
23
- # - name: Run tests
24
- # run: |
25
- # if [ -f tests/test.py ]; then python -m unittest discover -s tests; fi
26
 
27
  deploy-to-hf:
28
  runs-on: ubuntu-latest
29
- needs: build-and-test
30
  environment: prod
31
  steps:
32
  - name: Checkout code
@@ -69,7 +69,4 @@ jobs:
69
  git push hf main --force
70
 
71
  # Optional: Restart Space via API
72
- python -c "
73
- from huggingface_hub import HfApi;
74
- api = HfApi(token='$HF_TOKEN');
75
- api.restart_space(repo_id='${HF_USERNAME}/${HF_SPACE_NAME}')
 
7
  branches: [ main ]
8
 
9
  jobs:
10
+ # build-and-test:
11
+ # runs-on: ubuntu-latest
12
+ # steps:
13
+ # - name: Checkout repo
14
+ # uses: actions/checkout@v3
15
+ # - name: Set up Python
16
+ # uses: actions/setup-python@v4
17
+ # with:
18
+ # python-version: '3.10'
19
+ # - name: Install dependencies
20
+ # run: |
21
+ # python -m pip install --upgrade pip
22
+ # pip install -r requirements.txt
23
+ # # - name: Run tests
24
+ # # run: |
25
+ # # if [ -f tests/test.py ]; then python -m unittest discover -s tests; fi
26
 
27
  deploy-to-hf:
28
  runs-on: ubuntu-latest
29
+ # needs: build-and-test
30
  environment: prod
31
  steps:
32
  - name: Checkout code
 
69
  git push hf main --force
70
 
71
  # Optional: Restart Space via API
72
+ python -c "from huggingface_hub import HfApi; api = HfApi(token='$HF_TOKEN'); api.restart_space(repo_id='${HF_USERNAME}/${HF_SPACE_NAME}')"