This tutorial explains how to deploy automatically from bitbucket (or github) to AWS S3.
- Go to Create Application
- Select use bitbucket (or github)
- Choose your repo
- For the next questions, choose the default answers
box: wercker/default
deploy:
steps:
- s3sync:
key-id: $S3_ACCESS_KEY_ID
key-secret: $S3_SECRET_KEY
bucket-url: $S3_BUCKET_NAME
- on AWS, go to
Security Credentials - Go to
Access Keys (Access Key ID and Secret Access Key) - Create a new key and keep the
Access key IDand theSecret Access Keyin a safe place.
- on Wercker, go to the settings of your app
- in
Deploy targets, click onadd deploy targetand choosecustom deploy - Target name can be
production - Select Autodeploy
- Branch name is
master - Click on
add new variableand create a new environement variable with the nameS3_ACCESS_KEY_IDand your access key id as text - Create another new variable with the name
S3_SECRET_KEYand your secret access key as text - Create another variable with the name
S3_BUCKET_NAMEands3://example.comas text (change example.com with the name of your bucket)
Wercker should run the build (that does nothing so far) and deploy on s3.
I added here also an example wercker.yml for a s3sync
http://manuelgruber.com/2014/jekyll-bitbucket-to-aws-s3/