From 111f29554298eccc41144c10fd501012c242b348 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 18 Aug 2016 22:11:12 +0900 Subject: [PATCH] generate gh-pages task --- Rakefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Rakefile b/Rakefile index 97c22a45f..fdba19ad8 100644 --- a/Rakefile +++ b/Rakefile @@ -26,4 +26,13 @@ RDoc::Task.new do |doc| doc.rdoc_dir = 'html' end +task :ghpages => :rdoc do + `git checkout gh-pages` + require 'fileutils' + FileUtils.rm_rf '/tmp/html' + FileUtils.mv 'html', '/tmp' + FileUtils.rm_rf '*' + FileUtils.cp_r Dir.glob('/tmp/html/*'), '.' +end + task :default => :test