Skip to content

Instantly share code, notes, and snippets.

@shaliko
Created August 21, 2017 15:10
Show Gist options
  • Save shaliko/36a645618d7c86e17d420e4c1b612521 to your computer and use it in GitHub Desktop.
Save shaliko/36a645618d7c86e17d420e4c1b612521 to your computer and use it in GitHub Desktop.
GitLab Continuous Integration with Capistrano 2
deploy_staging:
environment: staging
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:
- develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment