Skip to content

Commit

Permalink
fix(env): set NEXT_PUBLIC_RECAPTCHA_SITE_KEY_STAGING when deploying
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvaznewm committed May 22, 2024
1 parent 2db6ff8 commit 6afd9e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ jobs:
- name: Deploy to Lambda Function
run: |
npm install --prefix .github/workflows/cdk
APPNAME=mobile-wallet-connector APPID=MobileWalletConnector QUALIFIER=Garage npm run --prefix .github/workflows/cdk cdk:deploy deploy -- --require-approval never
APPNAME=mobile-wallet-connector APPID=MobileWalletConnector QUALIFIER=Garage NEXT_PUBLIC_RECAPTCHA_SITE_KEY_STAGING=${{ secrets.RECAPTCHA_SITE_KEY_STAGING }} npm run --prefix .github/workflows/cdk cdk:deploy deploy -- --require-approval never
4 changes: 4 additions & 0 deletions .github/workflows/cdk/bin/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const appName = process.env.APPNAME || "APPNAME";
const appId = process.env.APPID || "APPID";
const appNameAbbr = appName.replace(/-/g, "");
const qualifier = process.env.QUALIFIER || "UNDEFINED";
const recaptchaKey = process.env.NEXT_PUBLIC_RECAPTCHA_SITE_KEY_STAGING || "";
const rootDir = path.resolve(__dirname, "..", "..", "..", "..");

class WebDeployStack extends cdk.Stack {
Expand All @@ -24,6 +25,9 @@ class WebDeployStack extends cdk.Stack {
code: lambda.DockerImageCode.fromImageAsset(rootDir, {
file: path.join("apps", appName, "Dockerfile"),
}),
environment: {
NEXT_PUBLIC_RECAPTCHA_SITE_KEY_STAGING: recaptchaKey,
},
memorySize: 1024,
}
);
Expand Down

0 comments on commit 6afd9e3

Please sign in to comment.