2012-01-02 23:51:35 -05:00
|
|
|
task :default => :server
|
|
|
|
|
|
|
|
desc 'Build site with Jekyll'
|
|
|
|
task :build do
|
2013-08-18 20:43:34 -04:00
|
|
|
jekyll 'build'
|
2012-01-02 23:51:35 -05:00
|
|
|
end
|
|
|
|
|
2013-10-25 11:43:09 -04:00
|
|
|
desc 'Build and start local server'
|
2012-01-02 23:51:35 -05:00
|
|
|
task :server do
|
2013-10-25 11:43:09 -04:00
|
|
|
jekyll 'serve -w -D'
|
2012-01-02 23:51:35 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
desc 'Build and deploy'
|
|
|
|
task :deploy => :build do
|
|
|
|
sh 'rsync -rtzh --delete _site/ walkah.net:/var/www/walkah.net/'
|
|
|
|
end
|
|
|
|
|
|
|
|
def jekyll(opts = '')
|
|
|
|
sh 'rm -rf _site'
|
|
|
|
sh 'jekyll ' + opts
|
|
|
|
end
|