Skip to content

Commit 84eb823

Browse files
authored
Add CI/CD workflow for deployment
1 parent c1a1218 commit 84eb823

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI/CD
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
deploy:
13+
name: Deploy
14+
runs-on: ubuntu-latest
15+
env:
16+
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }}
17+
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }}
18+
DEPLOY_ENV: ${{ github.event_name == 'pull_request' && 'test' || 'main' }}
19+
20+
steps:
21+
- name: Checkout Repository
22+
uses: actions/checkout@v4
23+
24+
- name: Install the latest version of uv
25+
uses: astral-sh/setup-uv@v5
26+
with:
27+
version: "latest"
28+
29+
- name: Install Modal
30+
run: |
31+
uv tool install modal
32+
- name: Deploy job
33+
run: |
34+
echo "Deploying with $DEPLOY_ENV environment"
35+
modal deploy deployment.py -e $DEPLOY_ENV

0 commit comments

Comments
 (0)