push
This commit is contained in:
parent
cd959dd9ab
commit
7a9e30cdae
@ -23,7 +23,7 @@ test:
|
|||||||
script:
|
script:
|
||||||
- cargo test --verbose
|
- cargo test --verbose
|
||||||
|
|
||||||
deploy:
|
deploy-staging:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
before_script:
|
before_script:
|
||||||
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
|
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
|
||||||
@ -31,6 +31,7 @@ deploy:
|
|||||||
- echo "$SSH_PRIVATE_KEY" | ssh-add -
|
- echo "$SSH_PRIVATE_KEY" | ssh-add -
|
||||||
- mkdir -p ~/.ssh
|
- mkdir -p ~/.ssh
|
||||||
- chmod 700 ~/.ssh
|
- chmod 700 ~/.ssh
|
||||||
|
- ssh-keyscan -H $SSH_HOST > ~/.ssh/known_hosts
|
||||||
script:
|
script:
|
||||||
- scp target/$CARGO_TARGET/release/rot $SSH_USER@$SSH_HOST:/home/k004373/rowing-staging
|
- 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'
|
||||||
@ -41,3 +42,21 @@ deploy:
|
|||||||
|
|
||||||
only:
|
only:
|
||||||
- staging
|
- staging
|
||||||
|
|
||||||
|
deploy-main:
|
||||||
|
stage: deploy
|
||||||
|
before_script:
|
||||||
|
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
|
||||||
|
- eval $(ssh-agent -s)
|
||||||
|
- echo "$SSH_PRIVATE_KEY" | ssh-add -
|
||||||
|
- mkdir -p ~/.ssh
|
||||||
|
- chmod 700 ~/.ssh
|
||||||
|
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'
|
||||||
|
|
||||||
|
only:
|
||||||
|
- main
|
||||||
|
Loading…
Reference in New Issue
Block a user