Commit 91dd0c2e authored by Vũ Hoàng Anh's avatar Vũ Hoàng Anh

ci: deploy automatically to 172.16.2.207

parent 85d77ce6
Pipeline #3298 failed with stage
in 1 second
stages:
- deploy
deploy_to_server:
stage: deploy
image: alpine:latest
before_script:
- apk add --no-cache openssh-client git
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan 172.16.2.207 >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- ssh anhvh@172.16.2.207 "
cd /home/anhvh/chatbot-canifa &&
git pull origin master &&
cd backend &&
docker compose up --build -d
"
only:
- master
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment