Skip to content

Commit

Permalink
fix: set env vars for function via .env file
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Nov 29, 2024
1 parent 71e97b1 commit a2a840c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand All @@ -69,7 +72,6 @@ jobs:
env:
VITE_DISCOVER: ${{ secrets.DISCOVER }}
VITE_FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }}
AGS_HOST: ${{ secrets.AGS_HOST }}

notify:
name: Notifications
Expand Down
3 changes: 2 additions & 1 deletion functions/.env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
AGS_HOST=
ENVIRONMENT=development
AGS_HOST=https://wrimaps.at.utah.gov

0 comments on commit a2a840c

Please sign in to comment.