Created
April 30, 2019 16:25
-
-
Save alexrios/deeb702021bd519ae8c08f3347adf01e to your computer and use it in GitHub Desktop.
Deploy static site to AWS S3 via Bitbucket pipelines
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
definitions: | |
steps: | |
- step: &S3-deploy-stg | |
#more info: bitbucket.org/atlassian/aws-s3-deploy | |
name: Deploy to staging | |
deployment: staging | |
script: | |
- pipe: atlassian/aws-s3-deploy:0.2.1 | |
variables: | |
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID | |
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY | |
AWS_DEFAULT_REGION: "sa-east-1" | |
S3_BUCKET: "stg.bucketname" | |
LOCAL_PATH: "." | |
ACL: "public-read" | |
CACHE_CONTROL: "max-age=3600" | |
DELETE_FLAG: "true" | |
- step: &S3-deploy-prd | |
#more info: bitbucket.org/atlassian/aws-s3-deploy | |
name: Deploy to production | |
deployment: production | |
script: | |
- pipe: atlassian/aws-s3-deploy:0.2.1 | |
variables: | |
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID | |
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY | |
AWS_DEFAULT_REGION: "sa-east-1" | |
S3_BUCKET: "prd.bucketname" | |
LOCAL_PATH: "." | |
ACL: "public-read" | |
CACHE_CONTROL: "max-age=3600" | |
DELETE_FLAG: "true" | |
pipelines: | |
branches: | |
feature/*: | |
- step: *S3-deploy-stg | |
master: | |
- step: | |
<<: *S3-deploy-prd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment