capistrano-scm-copy-command
Deploy anything which can be generated with a command with the help of capistrano
(Vers. 3):
I use this to deploy a site generated with Gulp, but you could use it to deploy all static sites, e.g. Jekyll, Grunt, even Middleman!
capistrano-scm-copy
was quite helpful as template for this gem. (I just changed 3 lines.)
Installation
Add this line to your application's Gemfile
:
gem 'capistrano-scm-copy-command', require: false
and require it in your Capfile
:
require 'capistrano-scm-copy-command'
And then execute:
$ bundle
Or install it yourself as:
$ gem install capistrano-scm-copy-command
Usage
Activate plugin
You just need to change :scm
to :scm_copy_command
in your deploy.rb
and define your :build_command
:
set :scm, :scm_copy_command
set :build_command, [:gulp, :default, "--env=#{fetch(:stage)}"]
Configuration
You can configure capistrano-scm-copy-command
by using the following options:
# Local name of archive build
set :archive_name, 'archive.zip'
# Name of build_directory
set :build_dir, 'build'
# 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
Required Software
Machine running capistrano
: capistrano 3
Servers:
- mktemp
- unzip
Contributing
- Fork it ( https://github.com/siebertm/capistrano-scm-copy-command/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