2023-12-08 06:25:57 -05:00
|
|
|
name: Deploy to host
|
|
|
|
on:
|
|
|
|
registry_package:
|
|
|
|
types: [published]
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-22.04-node
|
|
|
|
steps:
|
|
|
|
- name: SSH into Docker Host
|
2024-01-07 11:17:47 -05:00
|
|
|
uses: https://github.com/appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 # v1.0.3
|
2023-12-08 06:25:57 -05:00
|
|
|
with:
|
|
|
|
host: ${{ secrets.SSH_HOST }}
|
|
|
|
username: ${{ secrets.SSH_USERNAME }}
|
|
|
|
passphrase: ${{ secrets.SSH_PASSPHRASE }}
|
|
|
|
key: ${{ secrets.SSH_KEY }}
|
|
|
|
port: ${{ secrets.SSH_PORT }}
|
|
|
|
script: |
|
|
|
|
cd kon && docker compose pull && \
|
2024-01-11 22:03:57 -05:00
|
|
|
docker compose down --remove-orphans && docker compose up -d && \
|
|
|
|
docker image prune -f && docker system prune -f
|