add auto deploy
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 2m20s

This commit is contained in:
Shihaam Abdul Rahman 2025-04-12 03:07:46 +05:00
parent b8d9f5cf87
commit 63ce054bad
Signed by: shihaam
GPG Key ID: 6DA2E87EBC227636

View File

@ -21,7 +21,7 @@ jobs:
- name: Build Docker images - name: Build Docker images
working-directory: .build/prod working-directory: .build/prod
run: docker compose build run: BUILDKIT_PROGRESS=plain docker compose build
- name: Login to Docker Registry - name: Login to Docker Registry
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
@ -35,3 +35,11 @@ jobs:
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
working-directory: .build/prod working-directory: .build/prod
run: docker compose push run: docker compose push
- name: Deploy production
if: github.event_name != 'pull_request'
run: |
eval "$(ssh-agent -s)"
ssh-add - <<< ${{ secrets.SSH_PRIVATE_KEY }}
ssh-keyscan -H 10.0.1.5 >> ~/.ssh/known_hosts
ssh root@10.0.1.5 -t "cd /mnt && docker compose pull portal-ui portal-ui && docker compose up -d portal-ui portal-ui"