Created
June 7, 2013 05:47
-
-
Save olivierlacan/5727278 to your computer and use it in GitHub Desktop.
The hacky little Thor script I use to deploy my Jekyll site to GitHub Pages since it uses "unsafe plugins".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Deploy < Thor | |
include Thor::Actions | |
desc "github", "deploy to GitHub Pages" | |
def github | |
original_path = Dir.pwd | |
deploy_path = "/Users/olivierlacan/Development/perso/olivierlacan.github.com" | |
puts "Running Jekyll build --destination #{deploy_path}" | |
run "jekyll build --destination #{deploy_path}" | |
puts "Committing all changes" | |
run "cd #{deploy_path} && git add -A . && git commit -m 'Run jekyll build at #{Time.now}'" | |
puts "Deploying to GitHub" | |
run "cd #{deploy_path} && git push origin master" | |
puts "Donezies!" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment