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