$ yarn
$ change-java-version 8
change-java-version
was a command in Semaphore I used that allowed node-sass
to compile correctly without errors.
$ yarn test
$ yarn lint
If this is good to go, checks pass!
S3_BUCKET_NAME : cs-staging-frontend
S3_INDEX_DOC : index.html
S3_DIRECTORY : ././dist
AWS_DEFAULT_REGION : us-west-2
AWS_SECRET_ACCESS_KEY : XXX
AWS_ACCESS_KEY_ID : XXX
ENV vars for staging (only the S3_BUCKET_NAME changes for prod)
yarn
yarn build-staging
aws s3 sync $S3_DIRECTORY s3://$S3_BUCKET_NAME/ --acl=public-read --delete --exclude '.git/*'
aws configure set preview.cloudfront true
aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DIST --paths /index.html
aws s3 sync $S3_DIRECTORY s3://$S3_BUCKET_NAME/ --acl=public-read --delete --exclude '.git/*'
This deploys to staging!
Currently, what we've been doing, is the above... Then after playing with it on staging, manually promoting it to production.
For this, we basically used a button that did the same as above, but made the S3_BUCKET_NAME
the production bucket, and used yarn build