Skip to content

CI/CD Pipeline

Medipal uses GitHub Actions for continuous integration and deployment across all repositories. Shared workflows are centralised in mp-github-actions.

Pipeline Overview

Every repository has its own workflow configuration. Common stages include linting, testing, building, and deploying.

Schema-Driven Generation

When mp-schema changes, CI pipelines automatically regenerate:

  • TypeScript API clientsmp-frontend-api, mp-mobile-app-api, mp-mobile-app-tracker-api (via mp-typescript-api-generator)
  • Python Pydantic modelsmp-server-pydantic-models (via genma + yamser)
  • Python SQLAlchemy ORMmp-server-sql-alchemy-models
  • FastAPI route stubsmp-server-api
  • Configuration schemamp-server-config-schema

See Code Generation Pipeline for the full breakdown.

Docker Builds

Backend and frontend services are containerised using Docker. Images are pushed to AWS ECR and deployed via Nginx reverse proxy.

  • mp-server and mp-tracker produce Docker images
  • mp-frontend and mp-mobile-app are built as static assets served behind mp-frontend-nginx-proxy
  • Mobile native builds use Fastlane (mp-mobile-app-builder) for iOS TestFlight and Google Play distribution

Deployment Environments

  • Development — automatic deployment on push to development
  • Staging — automatic deployment on push to main
  • Production — manual approval required

Infrastructure is managed by mp-tf-infrastructure (Terraform on AWS).

Centralized Workflows

The mp-github-actions repository provides shared workflows and composite actions used across the platform:

WorkflowPurpose
Code generationmp-schema push → regenerate TypeScript clients, Pydantic models, SQLAlchemy models
Build & testESLint, Prettier, Vitest, Playwright e2e
Publishnpm packages to GitHub Packages, Docker images to AWS ECR
MobileAndroid/iOS native builds via Fastlane, app store deployment
DeployEC2 pull-based deployment for frontend services

See Platform Architecture for how CI/CD fits into the overall system.