-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (25 loc) · 877 Bytes
/
dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# REF: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
name: Deploy Dev
on:
push:
branches:
- phi-2
jobs:
deploy-dev:
runs-on: ubuntu-latest
env:
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }}
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }}
steps:
- name: Checkout own repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Python packages
run: pip install modal-client
- name: Deploy FastAPI app
run: cd ${{ github.ref_name }};modal deploy fastapi_app.py
- name: Test FastAPI app
run: "pwd;cd ${{ github.ref_name }};curl -X POST -H 'Content-Type: application/json' -d @prompt.json ${{ secrets.PHI_2_APP_URL }}v1/completions"