phuochungus commited on
Commit
6dc0829
1 Parent(s): bbd4eb6

update github action

Browse files
.github/workflows/_.yml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Deploy
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ workflow_run:
6
+ workflows:
7
+ - "Test"
8
+ types:
9
+ - completed
10
+
11
+ jobs:
12
+ deploy:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: nschloe/action-checkout-with-lfs-cache@v1
16
+ with:
17
+ fetch-depth: 0
18
+ - name: Push to hub
19
+ env:
20
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
21
+ run: git push https://phuochungus:$HF_TOKEN@huggingface.co/spaces/phuochungus/RTMDet_PRODUCTION main
.github/workflows/deploy.yml CHANGED
@@ -2,20 +2,30 @@ name: Deploy
2
 
3
  on:
4
  workflow_dispatch:
5
- workflow_run:
6
- workflows:
7
- - "Test"
8
- types:
9
- - completed
10
 
11
  jobs:
12
  deploy:
13
  runs-on: ubuntu-latest
14
  steps:
15
- - uses: nschloe/action-checkout-with-lfs-cache@v1
 
 
 
 
 
 
 
 
 
 
16
  with:
17
- fetch-depth: 0
18
- - name: Push to hub
 
 
 
19
  env:
20
- HF_TOKEN: ${{ secrets.HF_TOKEN }}
21
- run: git push https://phuochungus:$HF_TOKEN@huggingface.co/spaces/phuochungus/RTMDet_PRODUCTION main
 
2
 
3
  on:
4
  workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - DA1
 
 
8
 
9
  jobs:
10
  deploy:
11
  runs-on: ubuntu-latest
12
  steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - name: Set up Python 3.8 and install dependencies
16
+ uses: actions/setup-python@v3
17
+ with:
18
+ python-version: "3.8"
19
+ cache: "pip"
20
+ - run: pip install -r app/requirements.txt
21
+
22
+ - name: install apt dependencies
23
+ uses: awalsh128/cache-apt-pkgs-action@latest
24
  with:
25
+ packages: wget
26
+
27
+ - name: download model
28
+ run: |
29
+ wget -P ./model $MODEL_URL
30
  env:
31
+ MODEL_URL: ${{secrets.MODEL_URL}}
 
.github/workflows/test.yml DELETED
@@ -1,40 +0,0 @@
1
- name: Test
2
- on:
3
- push:
4
- branches:
5
- - main
6
- pull_request:
7
- branches:
8
- - main
9
- jobs:
10
- build-linux:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: actions/checkout@v4
14
- - name: Set up Python 3.8 and install dependencies
15
- uses: actions/setup-python@v3
16
- with:
17
- python-version: "3.8"
18
- cache: "pip"
19
- - run: pip install -r app/requirements.txt
20
- - name: install apt dependencies
21
- uses: awalsh128/cache-apt-pkgs-action@latest
22
- with:
23
- packages: wget libgl1 ffmpeg redis
24
- - name: download model
25
- run: |
26
- wget -O ./model/end2end.onnx $MODEL_URL
27
- env:
28
- MODEL_URL: ${{secrets.MODEL_URL}}
29
- - name: Run test
30
- run: pytest
31
- env:
32
- SUPABASE_URL: ${{secrets.SUPABASE_URL}}
33
- SUPABASE_KEY: ${{secrets.SUPABASE_KEY}}
34
- FIREBASE_CREDENTIALS: ${{secrets.FIREBASE_CREDENTIALS}}
35
- NEO4J_URI: ${{secrets.NEO4J_URI}}
36
- NEO4J_USERNAME: ${{secrets.NEO4J_USERNAME}}
37
- NEO4J_PASSWORD: ${{secrets.NEO4J_PASSWORD}}
38
- AURA_INSTANCEID: ${{secrets.AURA_INSTANCEID}}
39
- AURA_INSTANCENAME: ${{secrets.AURA_INSTANCENAME}}
40
- FIREBASE_API_KEY: ${{secrets.FIREBASE_API_KEY}}