Deploy with Capistrano
Buddy turns deployments into a breeze, allowing you to automatically run deployment scripts on every push to branch. You can also deploy manually on click, or recurrently on time intervals.
In this example we will show you write a script that will let you deploy to Capistrano.
Example pipeline with Capistrano deployment
If you are new to Buddy, check out our quickstart guides that will tell you how to build and test your application before the deployment.
Configure pipeline in Buddy
- Create a new project in Buddy and select GitHub as the provider.
Creating a new project
- Add a new pipeline and configure the details: name, trigger mode, and a branch from which you want to deploy.
Adding a new pipeline
Configure Capistrano deployment script
- Since Capistrano is Ruby-based, look up and click Ruby on the action list to add it to the pipeline::
Build actions in Buddy (excerpt)
- Install Bundler to your
Gemfile
and enter the deployment script to the server defined in your config file (e.g.staging
):
gem install bundler
bundle install
bundle exec cap staging deploy
$$$
Default build commands in Buddy
You can add other commands to the build container before the deployment, for example
rake test
that will test your application before the upload.
- When ready, click Add this action to finish configuration.
Congratulations! You have just automated your deployment with Capistrano. 🥳
Last modified on December 12, 2023