1. Sean Davis
  2. nanocHome

Source

nanocHome / Rakefile

require 'nanoc/tasks'

task :upload do
  # This tasks uploads the content of the 'output' directory to the web
  # server. This specific rake task is specific to the Stoneship web site, but
  # it should be easy to adjust it to meet your own needs.
  #
  # This tasks requires rsync.
  #   
  # To configure, set 'src' to the path of the output directory on your local
  # computer (include a trailing slash). Set 'dst' to the path to your web
  # root (without trailing slash). Take a look at the example to see how it's
  # done (it's just a really simple rsync wrapper though).

  # Settings
  src = 'output/' # trailing slash
  dst = 'sdavis@gale.nci.nih.gov:public_html/'               # no trailing slash

  # Don't touch this!
  puts 'Publishing site...'
  sh('rsync', '-gpPrvz', src, dst)
  puts 'Site published.'
end

task :rupload do
  # This tasks uploads the content of the 'output' directory to the web
  # server. This specific rake task is specific to the Stoneship web site, but
  # it should be easy to adjust it to meet your own needs.
  #
  # This tasks requires rsync.
  #   
  # To configure, set 'src' to the path of the output directory on your local
  # computer (include a trailing slash). Set 'dst' to the path to your web
  # root (without trailing slash). Take a look at the example to see how it's
  # done (it's just a really simple rsync wrapper though).

  # Settings
  src = 'output/' # trailing slash
  # Assumes rgale is set up in .ssh/config and ssh tunnel is in place.
  dst = 'rgale:public_html/'               # no trailing slash

  # Don't touch this!
  puts 'Publishing site...'
  sh('rsync', '-gpPrvz', src, dst)
  puts 'Site published.'
end