Deploy middleman app with the help of capistrano
(Vers. 3).
capistrano-scm-copy
was
quite helpful as template for this gem.
Add this line to your application's Gemfile
:
gem 'capistrano-middleman', require: false
and require it in your Capfile
:
require 'capistrano-middleman'
And then execute:
$ bundle
Or install it yourself as:
$ gem install capistrano-middleman
You just need to change :scm
to :middleman
in your deploy.rb
.
set :scm, :middleman
You can configure middleman-presentation
by using the following options:
# Local name of archive build from middleman-build-directory
set :archive_name, 'archive.zip'
# Name of build_directory
set :build_dir, 'build'
# Name of source directory
set :source_dir, 'source'
# Keep permissions from filesystem
set :keep_filesystem_permissions, false
# Overwrite permissions of directories
set :directory_permissions, 2775
# Overwrite permissions of files
set :file_permissions, 0664
Machine running capistrano
: capistrano 3
Servers:
- mktemp
- unzip
- Fork it ( https://github.com/[my-github-username]/capistrano-middleman/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request