Permalink
Browse files

Only publish to gh-pages if it needs an update

  • Loading branch information...
1 parent 16954d7 commit d657aa3bd8e5ab2f6c9e94165c6c4e792a0b3456 @ianwhite committed Feb 27, 2009
Showing with 6 additions and 2 deletions.
  1. +6 −2 Rakefile
View
@@ -48,8 +48,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'

0 comments on commit d657aa3

Please sign in to comment.