Skip to content

Instantly share code, notes, and snippets.

@adamstac
Created November 28, 2009 07:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamstac/244434 to your computer and use it in GitHub Desktop.
Save adamstac/244434 to your computer and use it in GitHub Desktop.
ssh_user = "user@domain.com" # for rsync deployment
remote_root = "~/path/to/remote/" # for rsync deployment
desc "Runs preview"
task :preview do
system "staticmatic preview ."
end
desc "Builds the site"
task :build => 'styles:clear' do
puts "*** Building the site ***"
system "staticmatic build ."
end
desc "Clears the styles, generates new styles, builds the site, and finally deploys the site"
task :deploy => :build do
puts "*** Deploying the site ***"
system("rsync -avz --delete site/ #{ssh_user}:#{remote_root}")
end
namespace :styles do
desc "Clears the styles"
task :clear do
puts "*** Clearing styles ***"
system "rm -Rfv site/stylesheets/*"
end
desc "Generates new styles"
task :generate => :clear do
puts "*** Generating styles ***"
system "compass"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment