We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1a1218 commit 84eb823Copy full SHA for 84eb823
1 file changed
.github/workflows/main.yml
@@ -0,0 +1,35 @@
1
+name: CI/CD
2
+
3
+on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
9
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
34
+ echo "Deploying with $DEPLOY_ENV environment"
35
+ modal deploy deployment.py -e $DEPLOY_ENV
0 commit comments