Created
August 21, 2017 15:13
-
-
Save shaliko/4ed47da1cb690b91ea414b6547647409 to your computer and use it in GitHub Desktop.
GitLab Continuous Integration with Capistrano 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deploy: | |
environment: production | |
stage: deploy | |
script: | |
- which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y ) | |
- eval $(ssh-agent -s) | |
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store | |
- ssh-add <(echo -e “$SSH_PRIVATE_KEY”) | |
- gem install capistrano | |
- cap staging deploy | |
only: | |
- master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment