Deploy #44
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
jobs: | |
deploy: | |
name: Deploy bot | |
runs-on: ubuntu-latest | |
steps: | |
- name: Remote deploy | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
key: ${{ secrets.SSH_KEY }} | |
port: ${{ secrets.SSH_PORT }} | |
script: | | |
cd ~/projects/pythonista-bot/ | |
git reset --hard HEAD || true | |
git pull origin main | |
docker compose --profile snekbox pull | |
docker compose --profile snekbox up --build -d | |
username: ${{ secrets.SSH_USER }} | |
name: Deploy | |
on: | |
workflow_run: | |
workflows: ["Create and publish a Docker image"] | |
branches: [main] | |
types: | |
- completed |