diff options
author | Varac <varac@leap.se> | 2017-09-27 11:48:55 +0200 |
---|---|---|
committer | Varac <varac@leap.se> | 2017-09-27 11:48:55 +0200 |
commit | 9a92ad16e288d4a1d5550388cb0633dd994af370 (patch) | |
tree | b17029d5827247ae90d2bc733ac114a1b8a42fbc | |
parent | 868ffe83abba62adab22b050c6e2f99d73a7babf (diff) |
Deploy changes to website from CI
-rw-r--r-- | .gitlab-ci.yml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..745791b --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,19 @@ +--- +image: 0xacab.org:4567/leap/docker/ruby:stretch_amd64 + +deploy: + environment: + name: production + only: + - master + before_script: + # install ssh-agent + - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' + # run ssh-agent + - eval $(ssh-agent -s) + # add ssh key stored in SSH_PRIVATE_KEY variable to the agent store + - ssh-add <(echo "$SSH_PRIVATE_KEY") + script: + - apt-get update + - apt-get install -y --no-install-recommends capistrano + - cap deploy |