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

This commit is contained in:
Shihaam Abdul Rahman 2025-04-12 02:52:43 +05:00
parent 378c120035
commit 5e1364e083
Signed by: shihaam
GPG Key ID: 6DA2E87EBC227636

View File

@ -35,3 +35,10 @@ 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 root@10.0.1.5 -t "cd /mnt && docker compose pull portal-api portal-api-nginx && docker compose up -d portal-api portal-api-nginx"