From 8078f720fccc4bf35ef9835ef6e8b3b6f9c0514c Mon Sep 17 00:00:00 2001 From: Owen Date: Fri, 29 May 2026 15:21:04 +0200 Subject: [PATCH] update build steps to overwrite image --- .github/workflows/production.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 6929f78..f815843 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -26,6 +26,9 @@ jobs: # docker build . -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} # docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build image and publish with Cache uses: docker/build-push-action@v5 with: @@ -42,13 +45,13 @@ jobs: steps: - name: Connect and pull image from GHCR - uses: appleboy/ssh-action@master + uses: appleboy/ssh-action@v1.2.5 with: host: ${{ secrets.HOST }} username: ${{ secrets.USERNAME }} key: ${{ secrets.SSH_KEY }} port: ${{ secrets.PORT }} script: | - cd /home/${{ secrets.USERNAME }}/chess-pdf-api + cd /home/${{ secrets.USERNAME }} echo "${{ secrets.SUDO_PASSWORD }}" | sudo -S docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - echo "${{ secrets.SUDO_PASSWORD }}" | sudo -S docker compose up --build -d + echo "${{ secrets.SUDO_PASSWORD }}" | sudo -S docker compose up -d --force-recreate