Skip to content

Commit

Permalink
Github pages deploy task
Browse files Browse the repository at this point in the history
  • Loading branch information
wagenet committed Dec 28, 2011
1 parent 8ea9fee commit 3237890
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 22 deletions.
14 changes: 4 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
source :rubygems

gem 'rack'
gem 'rack-rewrite'
gem 'json'
gem 'rack-cache'

group :development do
gem 'rake-pipeline', :git => "https://github.com/livingsocial/rake-pipeline.git"
gem 'rake-pipeline-web-filters', :git => "https://github.com/wycats/rake-pipeline-web-filters.git"
gem 'redcarpet'
end
gem 'rake-pipeline', :git => "https://github.com/livingsocial/rake-pipeline.git"
gem 'rake-pipeline-web-filters', :git => "https://github.com/wycats/rake-pipeline-web-filters.git"
gem 'redcarpet'
gem 'highline'
17 changes: 5 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,36 +1,29 @@
GIT
remote: https://github.com/livingsocial/rake-pipeline.git
revision: bb82ce330c2fc4cc5d918ecd140df3a5c3c6aa10
revision: 3088a028f5676326b82437c20db94eda6b002413
specs:
rake-pipeline (0.5.0)
rake (~> 0.9.0)

GIT
remote: https://github.com/wycats/rake-pipeline-web-filters.git
revision: 671a8d29ca8cf4ead4f945b8623d13f3093bc376
revision: 4ee035750673d776f4f4aef31936fdd5b43f4102
specs:
rake-pipeline-web-filters (0.5.0)
rake-pipeline

GEM
remote: http://rubygems.org/
specs:
json (1.6.3)
rack (1.3.5)
rack-cache (1.1)
rack (>= 0.4)
rack-rewrite (1.2.1)
highline (1.6.8)
rake (0.9.2.2)
redcarpet (2.0.0)
redcarpet (2.0.1)

PLATFORMS
ruby

DEPENDENCIES
json
rack
rack-cache
rack-rewrite
highline
rake-pipeline!
rake-pipeline-web-filters!
redcarpet
22 changes: 22 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,25 @@ namespace :assets do
end
end

desc "Deploy the website to github pages"
task :deploy do |t, args|
require "highline/import"
message = ask("Provide a deployment message: ") do |q|
q.validate = /\w/
q.responses[:not_valid] = "Can't be empty."
end

# Cleaning may not be necessary
system "rakep clean"
system "rakep build"

Dir.chdir "output" do
unless File.exist?(".git")
system "git init"
system "git remote add origin [email protected]:emberjs/emberjs.github.com.git"
end
system "git add -A"
system "git commit -m '#{message.gsub("'", "\\'")}'"
system "git push origin master"
end
end

0 comments on commit 3237890

Please sign in to comment.