From 002cd3e6eb32d8425c77fe98db5a0b5bebeeabff Mon Sep 17 00:00:00 2001 From: philipp Date: Sun, 30 Jul 2023 17:14:56 +0200 Subject: [PATCH] push --- .gitlab-ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aeb74c2..898cc3a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,12 +34,11 @@ deploy-staging: - ssh-keyscan -H $SSH_HOST > ~/.ssh/known_hosts 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' + - ssh $SSH_USER@$SSH_HOST 'rm /home/k004373/rowing-staging/db.sqlite && cp /home/k004373/rowing/db.sqlite /home/k004373/rowing-staging/db.sqlite && mkdir /home/k004373/rowing-staging/svelte/build' - 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' - + - ssh $SSH_USER@$SSH_HOST 'sudo systemctl restart rotstaging' only: - staging @@ -51,12 +50,12 @@ deploy-main: - echo "$SSH_PRIVATE_KEY" | ssh-add - - mkdir -p ~/.ssh - chmod 700 ~/.ssh + - ssh-keyscan -H $SSH_HOST > ~/.ssh/known_hosts script: - scp target/$CARGO_TARGET/release/rot $SSH_USER@$SSH_HOST:/home/k004373/rowing - scp -r static $SSH_USER@$SSH_HOST:/home/k004373/rowing/ - scp -r templates $SSH_USER@$SSH_HOST:/home/k004373/rowing/ - scp -r svelte $SSH_USER@$SSH_HOST:/home/k004373/rowing/ - - ssh $SSH_USER@$SSH_HOST '/bin/systemctl restart rot' - + - ssh $SSH_USER@$SSH_HOST 'sudo systemctl restart rot' only: - main