Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Deploy script

  • Loading branch information...
commit 64882417760de0e5f2bc10e8c5d441147bbdb288 1 parent b6e562e
@cameronyule authored
Showing with 11 additions and 4 deletions.
  1. +11 −4 config/deploy.rb
View
15 config/deploy.rb
@@ -3,14 +3,16 @@
set :scm, :none
set :deploy_via, :copy
set :copy_compression, :gzip
-set :use_sudo, false
+set :use_sudo, true
+default_run_options[:pty] = true
server application, :web, :app
-set :user, "root"
-set :deploy_to, "/var/www/#{application}.com"
+set :user, "admin"
+set :deploy_to, "/var/www/#{application}"
before 'deploy:update', 'deploy:update_jekyll'
+after 'deploy:update', 'deploy:set_permissions'
namespace :deploy do
@@ -21,7 +23,12 @@
desc 'Run jekyll to update site before uploading'
task :update_jekyll do
- %x(rm -rf _site/* && jekyll)
+ %x(rm -rf _site/* && jekyll --no-auto)
+ end
+
+ desc 'Set file permissions for Apache user'
+ task :set_permissions do
+ run "#{sudo} chgrp -R www-data #{deploy_to}"
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.