image: php:7.1.1

pipelines:
  default:
   - step:
              # set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_DEFAULT_REGION as environment variables
              name: Deploy to AWS

              deployment: production
              # trigger: manual  # uncomment to have a manual step
              image: atlassian/pipelines-awscli
              script:
                - aws deploy push --application-name $APPLICATION_NAME --s3-location s3://$S3_BUCKET/$AWS_SECRET_ACCESS_KEY --ignore-hidden-files
                - aws deploy create-deployment --application-name $APPLICATION_NAME --s3-location bucket=$S3_BUCKET,key=$AWS_SECRET_ACCESS_KEY,bundleType=zip --deployment-group-name $DEPLOYMENT_GROUP_NAME
