From ba96e5c8c52771a961b6a60d129e0a5c91b54ea9 Mon Sep 17 00:00:00 2001 From: Agatha Rose Date: Mon, 1 Jun 2020 23:28:30 +0000 Subject: [PATCH] Update .gitlab-ci.yml to use new host (thanks to julia uwu) --- .gitlab-ci.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 832781a..f2ac30c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,12 +2,19 @@ stages: - deploy +before_script: + - apt-get update -qq + - apt-get install -qq git + # Setup SSH deploy keys + - 'which ssh-agent || ( apt-get install -qq openssh-client )' + - eval $(ssh-agent -s) + - ssh-add <(echo "$SSH_PRIVATE_KEY") + - mkdir -p ~/.ssh + - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' + production: stage: deploy script: - - apt-get update -qy - - apt-get install -y ruby-dev - - gem install dpl - - dpl --provider=heroku --app=$HEROKU_APP --api-key=$HEROKU_API_KEY + - ssh julia@prod.zotan.network "cd discordinyator/ && git checkout master && git pull origin master && sudo systemctl restart discordinyator.service && exit" only: - master