From 0c96386cf18c340fe1e10fac9888bd3fa272d098 Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Mon, 22 Jul 2024 16:19:07 +0800 Subject: [PATCH] few tweaks to cicd, and fix in Dockerfile --- .github/workflows/cd.yml | 12 ++++++++++++ console/Dockerfile.server-build | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index bfd3b77b..a62b08f5 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -139,6 +139,18 @@ jobs: fi working-directory: ./console + - name: Set Env Variables for QA + if: startsWith(github.ref, 'refs/heads/deploy/qa') + run: | + echo "STRIPE_KEY=${{ secrets.STRIPE_TEST_KEY }}" >> ./console/environments/.env.production + working-directory: ./console + + - name: Set Env Variables for Production + if: startsWith(github.ref, 'refs/heads/deploy/production') + run: | + echo "STRIPE_KEY=${{ secrets.STRIPE_KEY }}" >> ./console/environments/.env.production + working-directory: ./console + - name: Install dependencies run: pnpm install working-directory: ./console diff --git a/console/Dockerfile.server-build b/console/Dockerfile.server-build index 16cc84ee..473c011d 100644 --- a/console/Dockerfile.server-build +++ b/console/Dockerfile.server-build @@ -1,5 +1,5 @@ # ---- Build Stage ---- - FROM node:18.15.0-alpine + FROM node:18.15.0-alpine as builder # Set the working directory in the container to /console WORKDIR /console