-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 788 Bytes
/
main.yml
File metadata and controls
35 lines (30 loc) · 788 Bytes
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
name: CI/CD
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
env:
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }}
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }}
DEPLOY_ENV: ${{ github.event_name == 'pull_request' && 'test' || 'main' }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Install Modal
run: |
uv tool install modal
- name: Deploy job
run: |
echo "Deploying with $DEPLOY_ENV environment"
modal deploy deployment.py -e $DEPLOY_ENV