Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
parameters:
config:
description: |
The config file you want to build the app using.
The config file you want to build the app using.
E.g. 'development' would load configurations from 'config/development.json'
type: enum
enum: ["development", "staging", "production"]
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
parameters:
config:
description: |
The config file you want to build the app using.
The config file you want to build the app using.
E.g. 'development' would load configurations from 'config/development.json'
type: enum
enum: ["development", "staging", "production"]
Expand All @@ -178,11 +178,17 @@ jobs:
- attach_workspace:
at: *workspace
- run: # Required by aws-cli
name: Set AWS region var
command: echo 'export AWS_REGION=<< parameters.region >>' >> $BASH_ENV
- aws-s3/sync:
from: build_<< parameters.config >>
overwrite: true
to: 's3://<< parameters.bucket >>'
- run:
name: Invalidate Cloudfront
command: |
export DIST_ID=$(aws cloudfront list-distributions --query "DistributionList.Items[?Aliases.Items[?contains(@, '<< parameters.bucket >>')]].Id | [0]" | tr -d '"')
aws cloudfront create-invalidation --distribution-id ${DIST_ID} --paths "/*"

workflows:
version: 2
Expand Down