From 506e75da1f4131cf0d0f72f1fd50bb4b655bac9e Mon Sep 17 00:00:00 2001 From: Flemming Petersen Date: Sat, 23 Mar 2024 12:23:50 +0100 Subject: [PATCH] Add deployment --- .github/workflows/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5eeb1b0..799b2b9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,3 +62,11 @@ jobs: file: Dockerfile push: true tags: "ghcr.io/${{ github.repository }}:latest" + + - name: pull and start new image + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USER_NAME }} + key: ${{ secrets.PRIVATE_KEY}} + script: cd /root/main-server/ausleihe && docker compose pull && docker compose up -d && docker image prune -af