From fa48bf2984e88f34dfbc23d18b2403462d0414a1 Mon Sep 17 00:00:00 2001 From: philipp Date: Sun, 30 Jul 2023 16:27:54 +0200 Subject: [PATCH] push --- .gitlab-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2f72f81..6e28ef7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,10 +28,17 @@ deploy: before_script: - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' - eval $(ssh-agent -s) + - echo "$SSH_PRIVATE_KEY" - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - - mkdir -p ~/.ssh - chmod 700 ~/.ssh script: - scp target/$CARGO_TARGET/release/rot $SSH_USER@$SSH_HOST:/home/k004373/rowing-staging + - ssh $SSH_USER@$SSH_HOST 'rm /home/k004373/rowing-staging/db.sqlite && cp /home/k004373/rowing/db.sqlite /home/k004373/rowing-staging/db.sqlite' + - scp -r static $SSH_USER@$SSH_HOST:/home/k004373/rowing-staging/ + - scp -r templates $SSH_USER@$SSH_HOST:/home/k004373/rowing-staging/ + - scp -r svelte $SSH_USER@$SSH_HOST:/home/k004373/rowing-staging/ + - ssh $SSH_USER@$SSH_HOST '/bin/systemctl restart rotstaging' + only: - staging