NAME
App::Dapper::Deploy - Publish a site to Amazon S3, GitHub Pages, or anywhere.
DESCRIPTION
dapper deploy builds the site, checks it, and publishes the output directory. Where it goes is set under deploy in _config.yml:
deploy:
s3:
bucket: example.com
region: us-east-1 # optional
profile: personal # optional: an AWS CLI profile
cloudfront: E1A2B3C4D5E6F7 # optional: a distribution to refresh
cache_control: max-age=300 # optional
github_pages:
repo: git@github.com:me/site.git # default: this repository's origin
branch: gh-pages # the default
cname: www.example.com # optional
command: rsync -av --delete _output/ me@example.com:/var/www/site/
With one target, dapper deploy uses it; with several, name one: dapper deploy s3. Credentials are never stored in _config.yml: S3 uses the AWS CLI's own configuration (aws configure), and GitHub Pages uses git's.
- s3
-
Runs
aws s3 sync --delete, which uploads only files that changed and removes files that are gone, then (withcloudfront) asks CloudFront to refresh its copies. - github_pages
-
Commits the output to a branch (adding
.nojekyll, andCNAMEif set) and pushes it. The branch keeps its history. - command
-
Runs a command of your own.
DAPPER_OUTPUTholds the output directory.
The site is not deployed if dapper check finds errors, unless --force is given. --dry-run shows what would happen without changing anything. --no-build deploys the output directory as it is.
run
Takes a Dapper object, the target to deploy to (or undef to pick the only one), and options (dry_run, force, no_build). Builds, checks and deploys the site.
find_command
Takes a command name and returns true if it is on the PATH.
run_command
Takes a Dapper object and a command (as a list), prints it, and runs it. Dies if it fails.
s3
Deploys to Amazon S3 with the AWS CLI.
github_pages
Deploys to a GitHub Pages branch with git.
command
Deploys by running a command from _config.yml.