HTML and CSS Reference
This has no real functional use for now, but you can use this variable within your
configuration tasks and options.
Next, you will need to include the multistaging and Capistrano-offroad gems
using the following Ruby code:
This will include the appropriate code to allow you to deploy and control multiple
environments from a single command line. As well as providing a standard web-
friendly deployment configuration, Capistrano-offroad allows you to use
Capistrano outside of a Ruby project.
Next you will need to configure Capistrano multistage with the following lines of
set :stages, %w(production)
set :default_stage, "production"
The stages line dictates which environments you would like to deploy to. You
can have as many environments as you want, as long as they are separated by
spaces as shown next:
set :stages, %w(production staging development testing preprod)
The name of the stage environment should be used as the configuration file
name, as shown a little bit further into this chapter, and you can name the
environment anything you want as long as it only contains alpha characters and
no spaces or special characters. The default_stage variable sets what the
default stage environment will be, should you exclude the stage name from the
Next, you specify which offroad modules to use for the deployment. The offroad
defaults module will override a lot of the default Capistrano hooks, such as
creating shared file/folder definitions that capistrano will share between
revisions instead of overwriting. This is usually handy for logs, configuration
options, and user data. You can reimplement these hooks if needed, but for an
application with no server side code, it doesn't make sense to include this.
Now you have to configure Git. Capistrano will check out the latest specified
branch from Git/GitHub so that it can be uploaded. The :repository variable is
the project's GitHub URI that will be used to check out the latest code from
set :repository, " email@example.com:gavinwilliams-fishrod/ci.git" # The git repo URI
set :scm, :git # Tells capistrano to use GIT
set :branch, "master" # Tells capistrano which branch to use