Skip to content

Instantly share code, notes, and snippets.

@Shane24
Created August 11, 2014 16:37
Show Gist options
  • Select an option

  • Save Shane24/eac116559ffb65320011 to your computer and use it in GitHub Desktop.

Select an option

Save Shane24/eac116559ffb65320011 to your computer and use it in GitHub Desktop.
Jekyll rakefile
desc "deploy to staging"
task :staging do
local_dir = "./_site/"
remote_dir = "/home/projectname/htdocs/"
host = "1.2.3.4"
ssh_user = "user"
system "find #{local_dir} -type f -exec chmod 0644 {} +"
system "find #{local_dir} -type d -exec chmod 0755 {} +"
system "rsync -avz --delete -e 'ssh' #{local_dir} #{ssh_user}@#{host}:#{remote_dir}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment