Skip to content

Instantly share code, notes, and snippets.

@swalkinshaw
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swalkinshaw/6c9333b6369e6a28cf41 to your computer and use it in GitHub Desktop.
Save swalkinshaw/6c9333b6369e6a28cf41 to your computer and use it in GitHub Desktop.
set :application, 'wolfzeit.com'
set :repo_url, 'git@bitbucket.org:gabrielwolf/wolfzeit.com.git'
# Branch options
# Prompts for the branch name (defaults to current branch)
ask :branch, -> { `git rev-parse --abbrev-ref HEAD`.chomp }
# Hardcodes branch to always be master
# This could be overridden in a stage config file
set :branch, :master
set :deploy_to, -> { "/home/jibazee/public_html/#{fetch(:application)}" }
set :theme_path, -> { "#{fetch(:release_path)}/web/app/themes/wolfzeit" }
set :npm_target_path, fetch(:theme_path)
set :npm_flags, '--silent'
set :grunt_target_path, fetch(:theme_path)
set :grunt_tasks, 'build'
set :log_level, :debug
set :pty, true
# Apache users with .htaccess files:
# it needs to be added to linked_files so it persists across deploys:
# set :linked_files, %w{.env web/.htaccess}
set :linked_files, %w{.env}
set :linked_dirs, %w{web/app/uploads}
namespace :deploy do
desc 'Restart application'
task :restart do
on roles(:app) do
sudo 'service', 'apache2', 'restart'
end
end
end
before 'deploy:updated', 'grunt'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment