-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCapfile
37 lines (28 loc) · 943 Bytes
/
Capfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require 'rubygems'
require 'bundler'
Bundler.setup(:deploy)
load 'deploy'
set :stages, %w(production staging)
set :default_stage, "staging"
require 'capistrano/ext/multistage'
set :application, "brandymint.ru"
set :user, 'wwwbrandymint'
set :port, 22
set :deploy_to, defer {"/home/#{user}/#{application}" }
set :scm, :git
set :repository, "git@github.com:BrandyMint/brandymint.ru.git"
set :deploy_via, :copy
set :copy_cache, true
set :copy_exclude, Dir.entries(".") - %w(. .. build)
set :copy_compression, :gzip
set :use_sudo, false
set :normalize_asset_timestamps, false
set :keep_releases, 5
set :build_script, 'bower install; rm -rf build/*; bundle exec middleman build'
after 'deploy:finalize_update', 'brandymint:create_symlink'
after 'deploy', "deploy:cleanup"
namespace :brandymint do
task :create_symlink do
run("rm -rf #{latest_release}/public; ln -s #{latest_release}/build #{latest_release}/public")
end
end