Skip to content

Instantly share code, notes, and snippets.

@jjcall
Created September 15, 2011 15:18
Show Gist options
  • Save jjcall/1219529 to your computer and use it in GitHub Desktop.
Save jjcall/1219529 to your computer and use it in GitHub Desktop.
Wordpress theme deployment script
ssh_user = "USERNAME"
remote_path = "PATH TO THEME"
namespace :styles do
desc "Clear styles"
task :clear do
puts "*** Clearing styles ***"
system "rm -Rfv styles.css"
end
desc "Generate styles"
task :generate => [:clear] do
puts "*** Generating styles ***"
system 'compass compile'
end
end
desc "Clears the styles, generates new ones and then deploys the theme"
task :deploy => 'styles:generate' do
puts "*** Deploying the site ***"
system("rsync -avz --delete . #{ssh_user}:#{remote_path}")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment