Created
August 16, 2011 20:10
-
-
Save ltackett/1150040 to your computer and use it in GitHub Desktop.
Staticmatic deploy script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh_user = "[email protected]" # for rsync deployment | |
| remote_root = "~/example.com/" # 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 and generates new styles, builds and deploys" | |
| 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