Skip to content

Instantly share code, notes, and snippets.

@olvado
Created July 2, 2015 10:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olvado/19bd7909070a367ee7b5 to your computer and use it in GitHub Desktop.
Save olvado/19bd7909070a367ee7b5 to your computer and use it in GitHub Desktop.
Simple Middleman deploy script using s3cmd
[default]
access_key = ACCESS_KEY
secret_key = SECRET_KEY
bucket_location = US
cloudfront_host = cloudfront.amazonaws.com
cloudfront_resource = /2010-07-15/distribution
default_mime_type = binary/octet-stream
delete_removed = False
dry_run = False
encoding = UTF-8
encrypt = False
follow_symlinks = False
force = False
get_continue = False
gpg_command = None
gpg_decrypt = %(gpg_command)s -d --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
gpg_encrypt = %(gpg_command)s -c --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
gpg_passphrase =
guess_mime_type = True
host_base = s3.amazonaws.com
host_bucket = %(bucket)s.s3.amazonaws.com
human_readable_sizes = False
list_md5 = False
log_target_prefix =
preserve_attrs = True
progress_meter = True
proxy_host =
proxy_port = 0
recursive = False
recv_chunk = 4096
reduced_redundancy = False
send_chunk = 4096
simpledb_host = sdb.amazonaws.com
skip_existing = False
socket_timeout = 300
urlencoding_mode = normal
use_https = False
verbosity = WARNING
#!/bin/bash
# Stop on error
set -eo pipefail
echo Building site
middleman build
echo Syncing with s3
s3cmd sync ./build/ s3://bucketname --delete-removed --acl-public --recursive --follow-symlinks --no-preserve --add-header='Cache-Control: public, max-age=10' -c .s3cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment