-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
26 lines (24 loc) · 754 Bytes
/
Rakefile
File metadata and controls
26 lines (24 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require 'tmpdir'
require 'active_support/core_ext'
require 'html-proofer'
HTMLProofer.check_directory("./_site").run
desc "Generate jekyll site"
task :generate do
puts "## Generating Site with Jekyll"
system "jekyll build"
end
desc "Generate and publish blog to gh-pages"
task :publish do
Dir.mktmpdir do |tmp|
system "mv _site/* #{tmp}"
system "git checkout -b gh-pages"
system "rm -rf *"
system "mv #{tmp}/* ."
system 'git config --global user.email "max.barrass@gmail.com"'
system 'git config --global user.name "Max Barrass"'
system "git add ."
system "git commit -am 'Codeship Update'"
system "git remote add ghub git@github.com:aem-design/aem.design.git"
system "git push -f ghub gh-pages"
end
end