diff --git a/.circleci/deployment-workflow.yml b/.circleci/deployment-workflow.yml index a65e97e4f..7cec60bad 100644 --- a/.circleci/deployment-workflow.yml +++ b/.circleci/deployment-workflow.yml @@ -63,11 +63,21 @@ commands: default: '' mode: type: string - default: '' + default: dev steps: - run: name: Build code command: API_KEY=<< parameters.api_key >> CLIENT_ID=<< parameters.client_id >> GTM_ID=<< parameters.gtm_id >> ADOBE_LAUNCH_SCRIPT_URL=<< parameters.adobe_launch_script_url >> npm run build:<< parameters.mode >> + - when: + condition: + and: + - equal: [<< parameters.mode >>, 'prod'] + steps: + - run: + name: Set PROD specific env variables + command: | + echo 'export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_PROD' >> $BASH_ENV + echo 'export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_PROD' >> $BASH_ENV - aws-cli/setup - run: name: Sync build artifacts to S3