summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Capfile8
-rw-r--r--README.md13
-rw-r--r--config/deploy.rb36
-rw-r--r--config/deploy/production.rb8
4 files changed, 64 insertions, 1 deletions
diff --git a/Capfile b/Capfile
new file mode 100644
index 0000000..cf72b71
--- /dev/null
+++ b/Capfile
@@ -0,0 +1,8 @@
+require 'capistrano/setup'
+require 'capistrano/deploy'
+
+#
+# this will allow you to run `cap deploy`
+# instead of `cap production deploy`.
+#
+invoke :production
diff --git a/README.md b/README.md
index dddb932..238fb41 100644
--- a/README.md
+++ b/README.md
@@ -9,5 +9,16 @@ render the source files into html files.
To submit changes, please fork this repo and issue pull requests on github.
-For more information how to use `amber`, see: https://github.com/leapcode/amber.
+For more information how to use `amber`, see:
+https://github.com/leapcode/amber.
+For now, there is no post-commit hook on this repo that automatically triggers
+an update to the website. To deploy the current version:
+
+ sudo gem install capistrano
+ git clone https://leap.se/git/leap_se
+ cd leap_se
+ cap deploy
+
+This will deploy directly from master branch of https://leap.se/git/leap_se
+(in other words, local changes are not deployed). \ No newline at end of file
diff --git a/config/deploy.rb b/config/deploy.rb
new file mode 100644
index 0000000..d4f50e5
--- /dev/null
+++ b/config/deploy.rb
@@ -0,0 +1,36 @@
+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"
+ 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"
diff --git a/config/deploy/production.rb b/config/deploy/production.rb
new file mode 100644
index 0000000..6c9a2c8
--- /dev/null
+++ b/config/deploy/production.rb
@@ -0,0 +1,8 @@
+server 'hare.leap.se',
+ roles:['app'],
+ user:'website',
+ port: 22,
+ ssh_options: {
+ auth_methods: ['publickey'],
+ forward_agent: false
+ }