diff options
author | B Mathis <brandon@imathis.com> | 2009-11-24 16:53:24 -0600 |
---|---|---|
committer | B Mathis <brandon@imathis.com> | 2009-11-24 16:53:24 -0600 |
commit | 399fe77f6708634c96568e25e5849818c56cc1de (patch) | |
tree | ff482845bc11a403ee580813cf56fea6e2b01b30 | |
parent | 54766a0c3b9efe24c61e749e07c2f7c298819c93 (diff) | |
download | my_new_personal_website-399fe77f6708634c96568e25e5849818c56cc1de.tar.xz my_new_personal_website-399fe77f6708634c96568e25e5849818c56cc1de.zip |
updated rakefile to support github user pages, and github project pages for deployment
-rw-r--r-- | Rakefile | 27 |
1 files changed, 13 insertions, 14 deletions
@@ -1,22 +1,21 @@ require 'active_support' -## -- CHANGE FOR YOUR PROJECT -- ## -site_url = "http://yoursite.com" # deployed site url +site_url = "http://yoursite.com" # deployed site url for sitemap.xml generator +port = "4000" # preview project port eg. http://localhost:4000 +site = "site" # compiled site directory +source = "source" # source file directory + +## -- Rsync Deploy config -- ## ssh_user = "user@host.com" # for rsync deployment document_root = "~/document_root/" # for rsync deployment ## ---- ## -port = "4000" # preview project port eg. http://localhost:4000 -site = "site" # compiled site directory -source = "source" # source file directory - -# Github pages deploy config -# For github user pages, use "master" -# For github project pages use "gh-pages" -# If you're not using this, you can remove it +## -- Github Pages deploy config -- ## # Read http://pages.github.com for guidance - -github_pages_branch = "gh-pages" +# If you're not using this, you can remove it +source_branch = "source" # this compiles to your deploy branch +deploy_branch = "gh-pages" # For user pages, use "master" for project pages use "gh-pages" +## ---- ## def ok_failed(condition) if (condition) @@ -93,7 +92,7 @@ task :watch do end end -desc "generate and deploy website" +desc "generate and deploy website via rsync" multitask :deploy_rsync => [:default, :clean_debug] do print ">>> Deploying website <<<" ok_failed system("rsync -avz --delete #{site}/ #{ssh_user}:#{document_root}") @@ -112,7 +111,7 @@ multitask :github_user_deploy => [:default, :clean_debug] do message = ENV["MESSAGE"] || "Site updated at #{Time.now.utc}" repo.commit(message) repo.push - repo.branch("source").checkout + repo.branch("#{source_branch}").checkout end desc "start up an instance of serve on the output files" |