-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (40 loc) · 1.21 KB
/
staging.yaml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Deploy to Modal Staging
on:
push:
branches:
- staging
pull_request:
types: [closed]
branches:
- staging
jobs:
deploy:
if: github.ref == 'refs/heads/staging' && (github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true))
runs-on: ubuntu-latest
env:
DB: STAGE
steps:
- name: Checkout workflows repo
uses: actions/checkout@v4
with:
repository: edenartlab/workflows
path: workflows
- name: Checkout main repo
uses: actions/checkout@v4
with:
path: eve
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install the latest version of rye
uses: eifinger/setup-rye@v4
- name: Install dependencies
working-directory: eve
run: rye sync
- name: Configure Modal token
working-directory: eve
run: rye run modal token set --token-id ${{ secrets.MODAL_TOKEN_ID }} --token-secret ${{ secrets.MODAL_TOKEN_SECRET }}
- name: Deploy to Modal
working-directory: eve
run: rye run modal deploy ./eve/api/api.py