@aws/cloudfront-hosting-toolkit
Version:
CloudFront Hosting Toolkit offers the convenience of a managed frontend hosting service while retaining full control over the hosting and deployment infrastructure to make it your own.
21 lines (20 loc) • 674 B
YAML
version: 0.2
env:
parameter-store:
COMMITID: $SSM_PARAM_COMMITID
S3KEY: $SSM_PARAM_S3_KEY
phases:
build:
commands:
- |
if [ "$COMMITID" = "init" ] && [ "$S3KEY" = "init" ]; then
echo "No zip, this must be the first execution of the pipeline after infrastructure deployment"
else
mkdir temp
aws s3 cp s3://$SRC_BUCKET_NAME/$S3KEY ./temp
cd temp && ls
unzip *.zip
rm *.zip
echo aws s3 cp ./ s3://$DEST_BUCKET_NAME/$COMMITID/ --recursive #don't change this line
aws s3 cp ./ s3://$DEST_BUCKET_NAME/$COMMITID/ --recursive #don't change this line
fi