feat: changed deploy.yml
This commit is contained in:
parent
942966c5e9
commit
047b75786e
1 changed files with 8 additions and 6 deletions
14
.github/workflows/deploy.yml
vendored
14
.github/workflows/deploy.yml
vendored
|
@ -36,9 +36,11 @@ jobs:
|
|||
- name: Upload docker-compose.yml to server
|
||||
run: scp -o StrictHostKeyChecking=no docker-compose.yml ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/home/${{ secrets.SSH_USER }}/munera
|
||||
|
||||
- name: Deploy on server
|
||||
run: ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} << 'EOF'
|
||||
cd /home/${{ secrets.SSH_USER }}/munera
|
||||
docker-compose down
|
||||
docker-compose up --build -d
|
||||
EOF
|
||||
- name: Deploy on server - Change directory
|
||||
run: ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 'cd /home/${{ secrets.SSH_USER }}/munera'
|
||||
|
||||
- name: Deploy on server - Stop Docker containers
|
||||
run: ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 'cd /home/${{ secrets.SSH_USER }}/munera && docker-compose down'
|
||||
|
||||
- name: Deploy on server - Start Docker containers
|
||||
run: ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 'cd /home/${{ secrets.SSH_USER }}/munera && docker-compose up --build -d'
|
||||
|
|
Loading…
Reference in a new issue