Skip to content

Instantly share code, notes, and snippets.

@riywo
Created September 23, 2015 14:51
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 riywo/9976219fd5fd7fb22ea6 to your computer and use it in GitHub Desktop.
Save riywo/9976219fd5fd7fb22ea6 to your computer and use it in GitHub Desktop.
aws_s3_sync = "aws --region us-west-2 s3 sync public s3://blog.riywo.com --delete --storage-class=REDUCED_REDUNDANCY"
task :default => :server
task :server do
sh 'rm -fr public'
exec 'hugo server -b http://blog.riywo.com --appendPort=false -w --disableLiveReload'
end
task :test do
sh %Q{#{aws_s3_sync} --dryrun --size-only}
end
task :deploy do
sh aws_s3_sync
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment