mirror of
https://github.com/WatchOutNewsAgency/wona.github.com.git
synced 2026-01-01 01:16:26 +00:00
paramaterized feed, rsync deployment, and unified layouts
This commit is contained in:
16
Rakefile
16
Rakefile
@ -1,5 +1,16 @@
|
||||
require 'active_support'
|
||||
|
||||
# preview project on this port - http://localhost:4000
|
||||
port = "4000"
|
||||
|
||||
# compiled site directory
|
||||
site = "site"
|
||||
|
||||
# for rsync deployment
|
||||
ssh_user = "user@host.com"
|
||||
document_root = "~/document_root/"
|
||||
|
||||
|
||||
def ok_failed(condition)
|
||||
if (condition)
|
||||
puts "OK"
|
||||
@ -8,9 +19,6 @@ def ok_failed(condition)
|
||||
end
|
||||
end
|
||||
|
||||
port = "4000"
|
||||
site = "site"
|
||||
|
||||
desc "list tasks"
|
||||
task :default do
|
||||
puts "Tasks: #{(Rake::Task.tasks - [Rake::Task[:default]]).to_sentence}"
|
||||
@ -35,7 +43,7 @@ end
|
||||
desc "generate and deploy website"
|
||||
task :deploy => :generate do
|
||||
print "Deploying website..."
|
||||
ok_failed system("rsync -avz --delete #{site}/ user@host.com:~/document_root/")
|
||||
ok_failed system("rsync -avz --delete #{site}/ #{ssh_user}:#{document_root}")
|
||||
end
|
||||
|
||||
desc "start up an instance of serve on the output files"
|
||||
|
||||
Reference in New Issue
Block a user