Deploy Bot #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Bot | |
# Запускается вручную или после успешного выполнения docker-publish | |
on: | |
workflow_run: | |
workflows: ["Build and Push Docker image"] | |
types: | |
- completed | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deployment start | |
run: echo "Deployment process is starting..." | |
- name: SSH and Deploy | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
script: | | |
cd /root/todoist || true | |
ddocker stop todoist | |
docker rm todoist | |
docker-compose up -d | |