From 258c812383adc60cd7e595c1a2263a1da9ccc16a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Tue, 26 Jul 2022 19:15:14 +0200 Subject: [PATCH] feat: deploy to dev --- .gitlab-ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4aff1d4..cce9191 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,6 +16,21 @@ build site: paths: - dist +deploy dev: + image: instrumentisto/rsync-ssh + stage: deploy + only: + refs: + - develop + script: + - mkdir ~/.ssh + - echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + - eval $(ssh-agent -s) + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - + - rsync -vr -e "ssh -p ${SSH_PORT}" dist/ "${DEPLOY_DEST}/dev/" + + deploy site: image: instrumentisto/rsync-ssh stage: deploy