Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (22 sloc) 497 Bytes
desc "deploy site to"
task :deploy do
require 'rubygems'
require 'highline/import'
require 'net/ssh'
branch = "master"
Net::SSH.start('', 'nirvdrum', :port => 22) do |ssh|
commands = <<EOF
cd /var/www/
git checkout #{branch}
git pull origin #{branch}
git checkout -f
jekyll --no-auto
rm -rf ../_old
mv ../www ../_old
mv _site ../www
echo "Done deploying"
commands = commands.gsub(/\n/, "; ")
ssh.exec commands
Jump to Line
Something went wrong with that request. Please try again.