feat: added CD deploy part to gitlab-ci.yml

Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
Louis Vallat 2022-07-02 01:16:39 +02:00
parent 06ed04fbbb
commit 4280261c1e
No known key found for this signature in database
GPG Key ID: 0C87282F76E61283

View File

@ -28,4 +28,15 @@ release-master:
only:
- master
deploy:
stage: deploy
before_script:
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
script:
- ssh -o StrictHostKeyChecking=no -p $SSH_PORT $SSH_DESTINATION "cd $PATH_TO_APPLICATION; $UPGRADE_COMMAND;"
only:
- master