Add API rebuild to deploy workflow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-17 13:59:29 +03:00
parent cc1ce4d7f6
commit 40e4c04f44

View File

@@ -25,8 +25,22 @@ jobs:
cd /opt/hotelsync/app
docker build -t hotelsync-frontend:latest .
docker build -t hotelsync-cp:latest ./cp
docker build -t hotelsync-api:latest ./backend
echo "✅ Images built"
- name: Restart API container
run: |
docker stop hotelsync-api 2>/dev/null || true
docker rm hotelsync-api 2>/dev/null || true
docker run -d \
--name hotelsync-api \
--network hotelsync_hotelsync-net \
--network-alias api \
--restart unless-stopped \
--env-file /opt/hotelsync/.env \
hotelsync-api:latest
echo "✅ API started"
- name: Restart frontend container
run: |
docker stop hotelsync-frontend 2>/dev/null || true