From cfc11153fdf6ed03b5aa994f653eadd53696c8d5 Mon Sep 17 00:00:00 2001 From: stdavis Date: Fri, 23 Aug 2024 10:04:49 -0600 Subject: [PATCH] fix: set env vars for function via .env file --- .github/workflows/release.yml | 6 ++++-- functions/.env | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8404dff..c03d4df 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,11 +34,12 @@ jobs: cd functions npm ci cd .. + echo "ENVIRONMENT=stage" > .env + echo "AGS_HOST=https://wrimaps.at.utah.gov" >> .env build-command: npm run build -- --mode dev env: VITE_DISCOVER: ${{ secrets.DISCOVER }} VITE_FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }} - AGS_HOST: ${{ secrets.AGS_HOST }} deploy-prod: name: Deploy to production @@ -59,6 +60,8 @@ jobs: cd functions npm ci cd .. + echo "ENVIRONMENT=prod" > .env + echo "AGS_HOST=https://wrimaps.utah.gov" >> .env build-command: npm run build -- --mode production service-now-instance: ${{ secrets.SN_INSTANCE }} service-now-table: ${{ secrets.SN_TABLE }} @@ -69,7 +72,6 @@ jobs: env: VITE_DISCOVER: ${{ secrets.DISCOVER }} VITE_FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }} - AGS_HOST: ${{ secrets.AGS_HOST }} notify: name: Notifications diff --git a/functions/.env b/functions/.env index 41ad1a0..56e1d7f 100644 --- a/functions/.env +++ b/functions/.env @@ -1 +1,2 @@ -AGS_HOST= +ENVIRONMENT=development +AGS_HOST=https://wrimaps.at.utah.gov