You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build a GitHub Actions CI/CD workflow to test, build a Docker image, and deploy to the Hetzner VPS on every push to main, with health checks and automatic rollback on failure.
Requirements
Functional
Test job: Run pytest, ruff, and black --check on every push.
Build job: Build Docker image tagged with commit SHA; push to registry.
Deploy job: SSH to Hetzner VPS, pull new image, restart services via Docker Compose.
Health check: Verify GET /health returns 200 within 30 seconds post-deploy.
Rollback: Revert to previous image if health check fails; send alert.
Goal
Build a GitHub Actions CI/CD workflow to test, build a Docker image, and deploy to the Hetzner VPS on every push to
main, with health checks and automatic rollback on failure.Requirements
Functional
pytest,ruff, andblack --checkon every push.GET /healthreturns 200 within 30 seconds post-deploy.Technical
.github/workflows/deploy.yml.DOCKER_USERNAME,DOCKER_PASSWORD,DOCKER_REGISTRY,HETZNER_SSH_KEY,HETZNER_HOST.Acceptance Criteria
maintriggers full test → build → deploy pipeline.Dependencies