Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #903 from mneorr/ssh_key

added ssh keys support (e.g. for Amazon ec2)
  • Loading branch information...
commit 9659a45da38115d60be84b9a671027288535e211 2 parents 9994770 + 7c9c4ba
@imathis imathis authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  Rakefile
View
3  Rakefile
@@ -10,6 +10,7 @@ require 'time'
# Be sure your public key is listed in your server's ~/.ssh/authorized_keys file
ssh_user = "user@domain.com"
ssh_port = "22"
+ssh_key = ""
document_root = "~/website.com/"
rsync_delete = false
rsync_args = "" # Any extra arguments to pass to rsync
@@ -299,7 +300,7 @@ task :rsync do
exclude = "--exclude-from '#{File.expand_path('./rsync-exclude')}'"
end
puts "## Deploying website via Rsync"
- ok_failed system("rsync -avze 'ssh -p #{ssh_port}' #{exclude} #{rsync_args} #{"--delete" unless rsync_delete == false} #{public_dir}/ #{ssh_user}:#{document_root}")
+ ok_failed system("rsync -avze 'ssh -p #{ssh_port} #{'-i' + ssh_key unless ssh_key.empty?}' #{exclude} #{rsync_args} #{"--delete" unless rsync_delete == false} #{public_dir}/ #{ssh_user}:#{document_root}")
end
desc "deploy public directory to github pages"
Please sign in to comment.
Something went wrong with that request. Please try again.