Skip to content

Commit

Permalink
Only publish to gh-pages if it needs an update
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Feb 27, 2009
1 parent 15c2c7e commit 2c7cd1b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Rakefile
Expand Up @@ -72,8 +72,12 @@ begin
end

namespace :doc do
Grancher::Task.new(:publish => :doc) do |g|
g.keep 'index.html', '.gitignore'
task :publish => :doc do
Rake::Task['doc:push'].invoke unless uptodate?('.git/refs/heads/gh-pages', 'doc')
end

Grancher::Task.new(:push) do |g|
g.keep_all
g.directory 'doc', 'doc'
g.branch = 'gh-pages'
g.push_to = 'origin'
Expand Down

0 comments on commit 2c7cd1b

Please sign in to comment.