-
Step 1 of 5Trigger
A push starts the pipeline
Merging to main triggers a GitHub Actions workflow. Nobody deploys from a laptop, so every release is reproducible and leaves a log.
-
Step 2 of 5Edge case
Fail fast on lint and tests
The first jobs install dependencies from the lockfile, then lint, type-check and run the tests. If any of them fails, nothing is built or deployed.
-
Step 3 of 5Docker
Build one image
Services are containerised with Docker. A multi-stage Dockerfile keeps build tools out of the final image, so the image that passed the checks is exactly what runs in production.
-
Step 4 of 5Deploy
Ship to Railway and Vercel
The pipeline deploys to Railway and Vercel. Secrets stay in the platforms' settings, never in the repo, and each environment gets its own variables.
-
Step 5 of 5Recap
What I set up
At Cocoon I containerised services with Docker and set up GitHub Actions deployments to Railway and Vercel. Checks before builds, one image per release and no manual deploys are the rules I'd keep on any team.
Tip: the ← and → keys work too.