Skip to content

Commit

Permalink
pull in gh-pages before pushing
Browse files Browse the repository at this point in the history
  • Loading branch information
defunkt committed Oct 20, 2009
1 parent 42ae1c4 commit 64d3028
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Rakefile
Expand Up @@ -18,7 +18,7 @@ namespace :hurl do
def installed?(app)
not `which #{app}`.chomp.empty?
end

desc "Generate GitHub pages."
task :pages => :check_dirty do
require "mustache"
Expand All @@ -30,12 +30,13 @@ namespace :hurl do
f.puts view.render
end
system "git checkout gh-pages"
system "git pull origin gh-pages"
system "mv new_index.html index.html"
system "git commit -a -m 'auto update docs'"
system "git push origin gh-pages"
system "git checkout master"
end

task :check_dirty do
if !`git status`.include?('nothing to commit')
abort "dirty index - not publishing!"
Expand Down

0 comments on commit 64d3028

Please sign in to comment.