From dd9672821c08b4147fabf22c72d819ed1776c411 Mon Sep 17 00:00:00 2001 From: OriginalByteMe Date: Fri, 17 Nov 2023 20:43:41 +0800 Subject: [PATCH] Add CI/CD workflow for deploying Modal jobs --- .github/workflows/ci-cd.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ci-cd.yml diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 0000000..c713da1 --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -0,0 +1,38 @@ +name: CI/CD + +on: + push: + 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 }} + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Install Python + uses: actions/setup-python@v2 + with: + python-version: "3.10" + + - name: Install Modal + run: | + python -m pip install --upgrade pip + pip install modal + + - name: Deploy cutout generator job + run: | + cd app + modal deploy grounded_cutouts.py + - name: Deploy s3_handler job + run: | + cd app/s3_handler + modal deploy app.py + \ No newline at end of file