ci: add Gitea Actions auto-deploy workflow

This commit is contained in:
2026-03-10 20:43:13 +03:00
parent 420d55d57e
commit fa335f1763

View File

@@ -0,0 +1,33 @@
name: Deploy to Production
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build -t hotelsync-frontend:latest .
- name: Deploy frontend
run: |
docker stop hotelsync-frontend 2>/dev/null || true
docker rm hotelsync-frontend 2>/dev/null || true
docker run -d \
--name hotelsync-frontend \
--network hotelsync_hotelsync-net \
--restart unless-stopped \
hotelsync-frontend:latest
echo "✅ Deploy complete!"
- name: Health check
run: |
sleep 3
curl -sf http://hotelsync-frontend/ > /dev/null && echo "✅ App is up!" || echo "❌ Health check failed"