Sha256: 2a0d883a8346046dcb9f7423f7f2803fb86f2366bdb60e46fa8755752171e16c

Contents?: true

Size: 681 Bytes

Versions: 14

Compression:

Stored size: 681 Bytes

Contents

SERVER = "yourhost.com"
USERNAME = "yourusername"
REMOTE_FOLDER = "/home/#{USERNAME}/yourhost.com"

PORT = 22

require 'net/scp'
require 'net/sftp'
require 'net/ssh'

<% if self.needs_guardfile? -%>
desc "compile CSS, js files"
task :compile do
  require 'guard'
  Guard.setup
  Guard::Dsl.evaluate_guardfile
  Guard::guards.each{|guard| guard.run_all}
end
<% end -%>
desc "Deploy web site"
<% if self.needs_guardfile? -%>
task :deploy => :compile do
<% else -%>
task :deploy do
<% end -%>
  Net::SSH.start(SERVER, USERNAME, {:port => PORT} ) do |ssh|
    ssh.sftp.rmdir File.join(REMOTE_FOLDER, "public")
    ssh.scp.upload! "public", REMOTE_FOLDER, :recursive => true
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
qedproject-0.6.2.1 templates/Rakefile
qedproject-0.6.2 templates/Rakefile
qedproject-0.6.1 templates/Rakefile
qedproject-0.6.0 templates/Rakefile
qedproject-0.5.0 templates/Rakefile
qedproject-0.4.2 templates/Rakefile
qedproject-0.4.1 templates/Rakefile
qedproject-0.4.0 templates/Rakefile
qedproject-0.3.2 templates/Rakefile
qedproject-0.3.1 templates/Rakefile
qedproject-0.3.0 templates/Rakefile
qedproject-0.2.1 templates/Rakefile
qedproject-0.2.0 templates/Rakefile
qedproject-0.1.1 templates/Rakefile