mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-09-30 06:53:12 +00:00
fix(cd): keep .env.production Sentry DSN when the GitHub var is empty
An unset vars.VITE_SENTRY_DSN becomes an empty env value and Vite will not let .env.production overwrite it, which would ship with Sentry off.
This commit is contained in:
parent
7ed0743b90
commit
0bf834bb8e
1 changed files with 8 additions and 0 deletions
8
.github/workflows/deploy-web.yaml
vendored
8
.github/workflows/deploy-web.yaml
vendored
|
|
@ -145,6 +145,14 @@ jobs:
|
|||
VITE_SENTRY_RELEASE: ${{ steps.commit.outputs.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# vars.VITE_SENTRY_DSN is unset today. An empty env value would
|
||||
# override .env.production and disable Sentry (Vite does not let
|
||||
# .env overwrite an existing variable).
|
||||
if [ -n "${VITE_SENTRY_DSN:-}" ]; then
|
||||
export VITE_SENTRY_DSN
|
||||
else
|
||||
unset VITE_SENTRY_DSN
|
||||
fi
|
||||
case "${TARGET_ENVIRONMENT}" in
|
||||
dev)
|
||||
export VITE_API_URL="https://api.dev.seahaven.com/api"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue