This commit is contained in:
philipp 2023-07-30 17:14:56 +02:00
parent cfba5bc856
commit 002cd3e6eb

View File

@ -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