diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml deleted file mode 100644 index 3cf56582..00000000 --- a/.gitea/workflows/deploy.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Deploy to Production - -on: - push: - branches: - - main - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - name: Pull latest code - run: | - set -euo pipefail - echo "=== Pulling latest code ===" - git -C /opt/03-business/cohorta pull origin main --ff-only - git -C /opt/03-business/cohorta log --oneline -3 - - - name: Ensure traefik-public network - run: | - docker network ls --format '{{.Name}}' | grep -q '^traefik-public$' \ - || docker network create traefik-public - - - name: Build and restart containers - run: | - set -euo pipefail - cd /opt/03-business/cohorta - docker compose build --no-cache frontend backend - docker compose up -d --remove-orphans - - - name: Health check - run: | - echo "Waiting for backend..." - for i in $(seq 1 30); do - docker exec cohorta-backend-1 python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:5137/api/health')" 2>/dev/null && echo "✓ Backend healthy" && break - sleep 3 - done - docker compose -f /opt/03-business/cohorta/docker-compose.yml ps - - - name: Done - run: echo "=== Deploy complete === https://cohorta.ai-impress.com"