Deploy to Capistrano
2 months ago1 min read
Cloud
Server v4.x
Server v3.x
Server v2.x
On This Page
Introduction
This page provides a configuration for deployment to Capistrano. Once your project is set up to use Capistrano, you can run deployment commands within your CircleCI job steps as required.
Configuration example
version: 2.1
workflows:
build-deploy:
jobs:
- build-job
- deploy-job:
requires:
- build-job # Only run deploy job once build job has completed
filters:
branches:
only: main # Only run deploy job when commit is on the main branch
jobs:
# build and test jobs go here - not included for brevity
deploy-job:
docker:
- image: <docker-image-name-tag>
auth:
username: mydockerhub-user
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
working_directory: ~/repo
steps:
- checkout
- run:
name: Bundle Install
command: bundle check || bundle install
- run:
name: Deploy if tests pass and branch is Main
command: bundle exec cap production deploy
Help make this document better
This guide, as well as the rest of our docs, are open source and available on GitHub. We welcome your contributions.
- Suggest an edit to this page (please read the contributing guidefirst).
- To report a problem in the documentation, or to submit feedback and comments, please open an issue on GitHub.
- CircleCI is always seeking ways to improve your experience with our platform. If you would like to share feedback, please join our research community.
Need support?
Our support engineers are available to help with service issues, billing, or account related questions, and can help troubleshoot build configurations. Contact our support engineers by opening a ticket.
You can also visit our support site to find support articles, community forums, and training resources.
CircleCI Documentation by CircleCI is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.