I wonder if this works
All checks were successful
Build and push container image / build (push) Successful in 10m49s

This commit is contained in:
toast 2024-03-11 10:30:52 +11:00
parent 3da094eaa6
commit db99c1f3ca
2 changed files with 12 additions and 24 deletions

View File

@ -39,7 +39,15 @@ jobs:
cache-to: type=local,dest=/tmp/.buildx-cache-kon
cache-from: type=local,src=/tmp/.buildx-cache,mode=max
- name: Rotate cache
run: |
rm -rf /tmp/.buildx-cache && \
mv /tmp/.buildx-cache-kon /tmp/.buildx-cache
- name: Container deployment
uses: https://github.com/appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 # v1.0.3
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 && \
docker compose down bot --remove-orphans && docker compose up -d bot && \
docker image prune -f && docker system prune -f

View File

@ -1,20 +0,0 @@
name: Deploy to host
on:
registry_package:
types: [published]
jobs:
deploy:
runs-on: ubuntu-22.04-node
steps:
- name: SSH into Docker Host
uses: https://github.com/appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 # v1.0.3
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 && \
docker compose down bot --remove-orphans && docker compose up -d bot && \
docker image prune -f && docker system prune -f