Skip to content

Commit

Permalink
fix: CLIENT_URL env variable undefined in deploys (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
e-wai authored Jan 2, 2023
1 parent bd143c3 commit 56a7753
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/actions/heroku-deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ inputs:
stripe-secret-key:
description: "Stripe secret key for checkout flow"
required: true
client-url:
description: "Client base URL for Stripe checkout result redirection"
required: true
deploy-branch:
description: "Source branch for deployment. Expected to be dev or main"
required: true
Expand Down Expand Up @@ -95,6 +98,7 @@ runs:
heroku config:set STRIPE_SECRET_TEST_KEY="${{ inputs.stripe-secret-key }}" -a $HEROKU_APP_NAME && \
heroku config:set PREVIEW_DEPLOY=$([ "${{inputs.deploy-branch}}" = "main" ] && echo "false" || echo "true") -a $HEROKU_APP_NAME
heroku config:set NODE_ENV="${{ inputs.node-env }}"
heroku config:set CLIENT_URL="${{ inputs.client-url }}"
env:
HEROKU_APP_NAME: "${{ inputs.heroku-app-name }}"
shell: bash
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ jobs:
mailer-refresh-token: "${{ secrets.PRODUCTION_MAILER_REFRESH_TOKEN }}"
stripe-publishable-key: "${{ secrets.STRIPE_PUBLISHABLE_TEST_KEY }}"
stripe-secret-key: "${{ secrets.STRIPE_SECRET_TEST_KEY }}"
client-url: "${{ secrets.CLIENT_URL }}"
deploy-branch: "main"
1 change: 1 addition & 0 deletions .github/workflows/heroku-deploy-dev-ts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ jobs:
mailer-refresh-token: "${{ secrets.MAILER_REFRESH_TOKEN }}"
stripe-publishable-key: "${{ secrets.STRIPE_PUBLISHABLE_TEST_KEY }}"
stripe-secret-key: "${{ secrets.STRIPE_SECRET_TEST_KEY }}"
client-url: "${{ secrets.CLIENT_URL }}"
deploy-branch: "dev"

0 comments on commit 56a7753

Please sign in to comment.