mirror of
https://github.com/TheRealOwenRees/chess-scribe-api.git
synced 2026-07-23 01:06:56 +00:00
update build steps to overwrite image
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user