Deploy Bot #37
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: ["Auto Tag, Release, and Changelog"] | |
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 | |
docker stop todoist || true | |
docker rm todoist || true | |
docker pull dzarlax/todoist_bot | |
docker-compose up -d | |