summaryrefslogtreecommitdiff
path: root/config/deploy.rb
blob: eb7c618e03519b0526c29a9ba578228cb6db715a (plain)
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
38
set :application, "leap_se"
set :deploy_to, "/home/website/leap-website"
set :scm, :git
set :repo_url,  "https://leap.se/git/leap_se"
set :branch, "master"
set :deploy_via, :remote_cache
set :use_sudo, false
set :keep_releases, 2

# use system gems:
set :default_environment, {
  'GEM_PATH' => '',
  'GEM_HOME' => ''
}

namespace :leap do
  task :link_to_chiliproject do
    on roles(:all) do |host|
      execute "rm -f #{current_path}/public/code"
      execute "ln -s /var/www/redmine/public #{current_path}/public/code"
      #execute "mkdir -p /var/www/redmine/public/themes/leap/stylesheets"
      #execute "ln -s #{current_path}/public/assets/redmine/application.css /var/www/redmine/public/themes/leap/stylesheets/application.css"
    end
  end
end

namespace :amber do
  task :rebuild do
    on roles(:all) do |host|
      within release_path do
        execute :amber, 'rebuild'
      end
    end
  end
end

after "deploy:updated", "amber:rebuild"
before "deploy:published", "leap:link_to_chiliproject"