File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55branches :
66 only :
77 - master
8- script : bundle exec rspec spec
8+ before_script : bundle exec rspec spec
9+ script : bundle exec rake generate
10+ after_success : bundle exec rake release
911env :
1012 global :
1113 secure : KLuKTR30DpaXXh3Vr0LoSYhXn7OsPL/yR5yoRUKB7C6MKxPFt+5gHzdPbXcx/hrcheXkQad4elxkco8qQiKWe4hNeorQFssbsvVSe2P5s2GMaYJma+WdEwDlYwsjpP98xIQ4v5vRamXehfpB8jy/n+mlvdGAIiXA/d1ka9BpkJI=
Original file line number Diff line number Diff line change 11source "https://rubygems.org"
22ruby '2.2.0' unless ENV [ 'DEV' ]
33
4- gem 'rake' , '~> 10.0'
4+ gem 'rake'
55gem 'github-pages'
66gem 'kramdown'
77gem 'travis'
Original file line number Diff line number Diff line change 155155 rspec-support (~> 3.1.0 )
156156 rspec-support (3.1.2 )
157157 safe_yaml (1.0.4 )
158- sass (3.4.9 )
158+ sass (3.4.10 )
159159 slop (3.6.0 )
160160 spidr (0.4.1 )
161161 nokogiri (~> 1.3 )
165165 hitimes
166166 toml (0.1.2 )
167167 parslet (~> 1.5.0 )
168- travis (1.7.4 )
168+ travis (1.7.5 )
169169 addressable (~> 2.3 )
170170 backports
171171 faraday (~> 0.9 )
@@ -193,7 +193,7 @@ PLATFORMS
193193DEPENDENCIES
194194 github-pages
195195 kramdown
196- rake ( ~> 10.0 )
196+ rake
197197 rspec
198198 spidr (~> 0.4 )
199199 travis
Original file line number Diff line number Diff line change @@ -22,6 +22,31 @@ task :preview do
2222 sh 'jekyll serve --watch'
2323end
2424
25+ desc "Release the current commit to ruby-korea/ruby-korea.github.io@master"
26+ task :release do
27+ commit = `git rev-parse HEAD` . chomp
28+ system "mkdir -p vendor/ruby-korea.github.io"
29+ system "git clone https://github.com/ruby-korea/ruby-korea.github.io.git vendor/ruby-korea.github.io"
30+
31+ Dir . chdir "vendor/ruby-korea.github.io" do
32+ sh "git config user.name '#{ ENV [ 'GIT_NAME' ] } '"
33+ sh "git config user.email '#{ ENV [ 'GIT_EMAIL' ] } '"
34+ sh 'git config credential.helper "store --file=.git/credentials"'
35+ File . open ( '.git/credentials' , 'w' ) do |f |
36+ f . write ( "https://#{ ENV [ 'GH_TOKEN' ] } :@github.com" )
37+ end
38+ sh "git reset --hard HEAD"
39+ sh "git checkout master"
40+ sh "git pull origin master"
41+
42+ rm_rf FileList [ "*" ]
43+ cp_r FileList [ "../../_site/*" ] , "./"
44+ sh "git add -A ."
45+ sh "git commit -m 'ruby-korea/ruby-korea.github.io@#{ commit } '"
46+ sh "git push origin master"
47+ end
48+ end
49+
2550namespace :check do
2651 desc 'validate _site markup with validate-website'
2752 task :markup => :generate do
You can’t perform that action at this time.
0 commit comments