-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
36 lines (29 loc) · 753 Bytes
/
Rakefile
File metadata and controls
36 lines (29 loc) · 753 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
27
28
29
30
31
32
33
34
35
36
require 'rake'
desc "Compile CSS files"
task :css do
`bundle install`
puts "Merging CSS"
Dir["./static/css/*.css"].each do |file|
`cat #{file} >> ./static/css/temp.css`
end
puts "Compressing CSS"
`yuicompressor static/css/temp.css > static/css/style.css`
puts 'CSS dumped to ./static/css/style.css'
`rm static/css/temp.css`
end
desc "Deploy site"
task :push do
Rake::Task['css'].execute
puts 'Comitting generated CSS'
`git add static/css/style.css`
`git commit -m 'Compressed CSS for deploy'`
puts "Pushing to Github"
`git push origin master`
`git push mirror master:gh-pages`
end
task "Serve"
task :serve do
Rake::Task['css'].execute
`open http://localhost:4000`
`jekyll --serve --no-pygments --auto`
end