- CI (
ci.yml): on push/PR builds, lints & tests both services. - CD (
cd.yml): on merge tomain, builds Docker images, pushes to Docker Hub, then SSHs into your VM and does a rollingdocker-compose up.
- VM must have Docker & Docker Compose installed.
- SSH key (with passphrase‑less access) in
~/.ssh/authorized_keys. - GitHub Secrets configured:
DOCKERHUB_USERNAME,DOCKERHUB_TOKENSERVER_HOST,SERVER_USER,SERVER_SSH_KEY
- Push or PR → ✅ CI runs.
- Merge into
main→ ✅ CD runs automatically. - You can also manually trigger CD in the Actions tab (workflow_dispatch).