Skip to content

Instantly share code, notes, and snippets.

@swalkinshaw
Forked from zillionart/bedrock_deploy.rb
Created May 20, 2014 03:43
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/17232e86d0b3d709095a to your computer and use it in GitHub Desktop.
Save swalkinshaw/17232e86d0b3d709095a to your computer and use it in GitHub Desktop.
set :application, 'example.com'
#github credentials obfuscated for privacy
set :repo_url, 'git@github.com:someone/somerepo.git'
# Branch options
# Prompts for the branch name (defaults to current branch)
#ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
# Sets branch to current one and not the master
#set :branch, proc { `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
# Define the deploy directory path
set :deploy_to, "/srv/www/#{fetch(:application)}"
# Define the theme path
set :theme_path, -> { "#{release_path}/web/app/themes/roots" }
set :log_level, :debug
set :linked_files, %w{.env}
set :linked_dirs, %w{web/app/uploads}
set :npm_target_path, fetch(:theme_path)
set :grunt_target_path, fetch(:theme_path)
namespace :deploy do
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
# Your restart mechanism here, for example:
execute :service, :nginx, :reload
end
end
end
# The above restart task is not run by default
# Uncomment the following line to run it on deploys if needed
after 'deploy:publishing', 'deploy:restart'
# Run grunt task before deploy so that the latest Roots changes are ready for deployment
before 'deploy:updated', 'grunt'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment