Key takeaways
- Automate tests and linting on every commit.
- Deploy the same artefact through staging to production.
- Make database migrations backwards compatible to allow rollback.
- Monitor after release and keep a tested rollback path.
If releasing your software feels like a risky weekend event, your delivery process needs automation. Continuous integration and continuous delivery (CI/CD) turn releases into routine, repeatable work: every change is built and tested automatically, and approved changes reach users through the same scripted path every time. This handbook shows how we set it up for web and mobile projects.
The pipeline in five stages
- Commit: developers push small changes to a Git branch.
- Build and test: the pipeline installs dependencies, runs linting, static analysis and automated tests.
- Package: a versioned artefact (a release folder or container image) is produced once.
- Staging: the same artefact is deployed to a production-like environment for acceptance testing.
- Production: after approval, the artefact is released with health checks and an automatic rollback path.
What to automate first
| Priority | Automation | Benefit |
|---|---|---|
| 1 | Automated tests on every pull request | Catches regressions before review |
| 2 | Code style and static analysis | Consistent, safer code |
| 3 | One-command deploy to staging | Frequent feedback from users |
| 4 | Scripted production deploy with approval | Fewer manual mistakes |
| 5 | Monitoring and alerts after release | Faster detection and recovery |
A minimal pipeline example
The following sketch shows the idea in GitHub Actions for a Laravel project; adapt it to your tooling and server access model.
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with: { php-version: '8.3' }
- run: composer install --no-interaction --prefer-dist
- run: php artisan test
Zero-downtime deployment techniques
- Atomic releases: upload a new release folder, then switch a symbolic link to it in one step. Rolling back means switching the link back.
- Backwards-compatible migrations: add columns first, deploy code, remove old columns later, so old and new code can run against the same database.
- Health checks: verify the application before sending traffic.
- Queue and cache handling: restart workers gracefully and warm caches after a deploy.
Environments and secrets
Keep development, staging and production separate. Store secrets in the CI platform or a vault, never in the repository. Do not use real personal data in staging unless it is masked; see our data protection guide.
Mobile apps
For Flutter or React Native, automate builds, signing and distribution to internal testers, then publish to the stores through managed release tracks. Treat the API and the app as versioned products so older app versions keep working while users update. See our framework comparison.
Measure delivery health
- Deployment frequency.
- Lead time from commit to production.
- Change failure rate.
- Time to restore service.
Improving these four measures is a reliable way to raise quality and trust. Pair them with a delivery model that fits your project, as discussed in Agile vs Waterfall.
Want help automating releases? Our DevOps engineers set up pipelines, monitoring and managed hosting. Talk to us or see cloud hosting options.
Frequently asked questions
What is CI/CD?
Continuous integration automatically builds and tests every change; continuous delivery or deployment automatically releases passing changes to staging or production.
How do you deploy without downtime?
Use atomic releases or blue-green deployment, run backwards-compatible migrations, warm caches and switch traffic only after health checks pass.
Which tools do you use?
Typically Git-based pipelines such as GitHub Actions or GitLab CI, with scripted deployments to cloud servers or containers.
Talk to a Melian solution architect
Planning a system for a bank, NGO or large organisation? Get a free discovery call, a scoped proposal and a relevant demo.
Book a free consultation →The Melian Software Digest
Practical insights on ERP, banking and NGO systems, cloud and security for decision-makers in Tanzania. One useful email a month. See a sample issue.