Skip to content

Commit

Permalink
fix(stacks.web): set node env only during web build step
Browse files Browse the repository at this point in the history
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
  • Loading branch information
BradenM committed Sep 23, 2023
1 parent 00af0ad commit 62418e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy-crisiscleanup-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
VITE_APP_SPANISH_PHONE_GATEWAY: ${{vars.VITE_APP_SPANISH_PHONE_GATEWAY}}
VITE_APP_DEFAULT_CALLER_ID: ${{vars.VITE_APP_DEFAULT_CALLER_ID}}
VITE_APP_CRISISCLEANUP_WEB_CLIENT_ID: ${{vars.VITE_APP_CRISISCLEANUP_WEB_CLIENT_ID}}
NODE_ENV: ${{vars.NODE_ENV}}
VITE_APP_WHAT_3_WORDS_API_KEY: ${{secrets.VITE_APP_WHAT_3_WORDS_API_KEY}}
VITE_APP_PITNEYBOWES_BASIC_AUTH_TOKEN: ${{secrets.VITE_APP_PITNEYBOWES_BASIC_AUTH_TOKEN}}
VITE_APP_PITNEYBOWES_API_KEY: ${{secrets.VITE_APP_PITNEYBOWES_API_KEY}}
Expand Down Expand Up @@ -104,6 +103,8 @@ jobs:
run: pnpm --ignore-workspace install
- name: Build Web
working-directory: ${{github.workspace}}/.crisiscleanup-4-web
env:
NODE_ENV: ${{vars.NODE_ENV}}
run: pnpm --ignore-workspace build:app
- name: Install
run: pnpm install
Expand Down
2 changes: 1 addition & 1 deletion packages/stacks/web/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ const pipeline = GithubCodePipeline.create({
'VITE_APP_SPANISH_PHONE_GATEWAY',
'VITE_APP_DEFAULT_CALLER_ID',
'VITE_APP_CRISISCLEANUP_WEB_CLIENT_ID',
'NODE_ENV',
),
...interpolateObject(
ActionsContext.SECRET,
Expand All @@ -94,6 +93,7 @@ const pipeline = GithubCodePipeline.create({
.synthPreStep({
name: 'Build Web',
workingDirectory: webRoot,
env: interpolateObject(ActionsContext.VARS, 'NODE_ENV'),
run: 'pnpm --ignore-workspace build:app',
})
.synthPreStep({
Expand Down

0 comments on commit 62418e8

Please sign in to comment.