Created
August 29, 2012 09:52
-
-
Save glidenote/3509434 to your computer and use it in GitHub Desktop.
octopress for s3
This file contains hidden or 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
diff --git a/Rakefile b/Rakefile | |
index 3d2b385..183ee17 100644 | |
--- a/Rakefile | |
+++ b/Rakefile | |
@@ -355,3 +355,16 @@ task :list do | |
puts "Tasks: #{(Rake::Task.tasks - [Rake::Task[:list]]).join(', ')}" | |
puts "(type rake -T for more detail)\n\n" | |
end | |
+ | |
+s3_bucket = "blog.glidenote.com" | |
+s3_delete = "" | |
+ | |
+desc "Deploy website to s3" | |
+task :s3 do | |
+ exclude = "" | |
+ if File.exists?('./s3-exclude') | |
+ exclude = "--exclude-from '#{File.expand_path('./s3-exclude')}'" | |
+ end | |
+ puts "## Deploying website via s3cmd" | |
+ ok_failed system("s3cmd sync --guess-mime-type --acl-public #{exclude} #{"--delete-removed" unless s3_delete == false} #{public_dir}/ s3://#{s3_bucket}/") | |
+end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment