From 2ec6baffe77364f0c1579be5c2da1b4ebec682b3 Mon Sep 17 00:00:00 2001 From: Richard Gong Date: Fri, 5 Jan 2024 14:42:11 +0000 Subject: [PATCH] add ci-cd --- .github/workflows/ci-cd.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 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..69054d2 --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -0,0 +1,31 @@ +name: CI/CD + +on: workflow_dispatch + +jobs: + test: + environment: CI + name: Deploy + runs-on: ubuntu-latest + env: + MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }} + MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }} + MODAL_ENVIRONMENT: ci-cd + + 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: Run training job on Modal + run: | + modal run src.train.py