Skip to content

Instantly share code, notes, and snippets.

@shaliko
Created August 21, 2017 15:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shaliko/4ed47da1cb690b91ea414b6547647409 to your computer and use it in GitHub Desktop.
Save shaliko/4ed47da1cb690b91ea414b6547647409 to your computer and use it in GitHub Desktop.
GitLab Continuous Integration with Capistrano 3
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