Skip to content
Permalink
Browse files

Add deploy task

  • Loading branch information...
pangratz committed Jul 21, 2012
1 parent 3de70b8 commit f3d1bb74e29b306ce3bc8e29132f7ef362c3f88d
Showing with 19 additions and 0 deletions.
  1. +19 −0 Rakefile
@@ -36,3 +36,22 @@ task :test => :build do
exit(1)
end
end

desc "deploy app"
task :deploy => :build do
origin = `git config remote.origin.url`.chomp
username = `git config user.name`.chomp
cd "assets" do
system "rm -rf .git"
system "git init"
system "git remote add origin #{origin}"
system "git checkout -b gh-pages"
system "git add ."
puts "\n## Commiting: Site updated at #{Time.now.utc}"
message = "Site updated at #{Time.now.utc}"
system "git commit -m \"#{message}\""
puts "\n## Pushing generated website"
system "git push origin gh-pages --force"
puts "\n## Github Pages deploy complete -- http://#{username}.github.com/dashboard"
end
end

0 comments on commit f3d1bb7

Please sign in to comment.
You can’t perform that action at this time.