On this page
It's Friday at 4 p.m. Someone opens a terminal, SSHs into the server, pulls the latest code, runs the migration and restarts the app. Everyone else waits. If it works, nobody thinks about it again. If it doesn't, the weekend is gone.
If that sounds familiar, you're not alone. Plenty of capable teams still deploy by hand, usually because the process grew one step at a time and "it works." The good news: you don't need a big DevOps overhaul to fix it. This guide shows how to move from manual deployments to a CI/CD pipeline in small, safe steps, without stopping feature work or risking production.
Why Manual Deployments Feel Safe (and Why They Aren't)
Manual deployment feels safe because a human is watching. In practice, that human is the risk. The steps live in someone's head or a half-updated wiki page. Small differences creep in each time: a forgotten environment variable, a skipped cache clear, a migration run in the wrong order.
The costs build up quietly:
- Releases get bigger and rarer. Because deploying is stressful, teams batch changes. Bigger releases mean more things can break at once, and it's harder to tell which change caused the problem.
- One person becomes the bottleneck. If only one engineer knows how to deploy, vacations and sick days stall releases.
- Recovery is slow. When something fails, rolling back is another manual process, done under pressure.
- There's no audit trail. It's hard to answer "what changed, when, and who shipped it?"
None of this means your team is doing it wrong. It means the process hasn't caught up with the product.
What CI/CD Actually Means for a Small Team
CI/CD is two ideas working together:
- Continuous integration (CI): every code change is automatically built and tested when it's pushed, so problems surface in minutes, not on deploy day.
- Continuous delivery or deployment (CD): tested code is packaged and released the same way every time. Delivery means it's always ready to ship and a person clicks approve. Deployment means it ships automatically.
For a team coming from manual releases, continuous delivery with a manual approval step is the sweet spot. You get repeatable, automated releases while keeping a human in control of when production changes.
Before You Automate: Write Down Your Current Deploy
The biggest mistake teams make is opening a CI tool before they understand their own process. Start with a plain document. Have the person who usually deploys walk through a real release while someone else writes down every single step, including the "obvious" ones.
Capture:
- Where the code comes from (branch, tag, someone's laptop).
- Build commands and versions of tools used.
- Environment variables, config files and secrets touched.
- Database changes and the order they run in.
- Services restarted, caches cleared, health checks done.
- How you'd undo it if something broke.
This runbook becomes the blueprint for your pipeline. Anything you can't explain clearly is a step you shouldn't automate yet.
A 6-Step Path From Manual Deploys to CI/CD
You don't have to do this all at once. Each step below is useful on its own, so you can stop at any point and still be better off than before.
Step 1: Put Everything in Version Control
Application code is usually there already. Move the rest in too: deploy scripts, server config, Dockerfiles, and infrastructure definitions if you have them. If a setting only exists on a production server, it's a risk. The rule is simple: if it affects how the app runs, it lives in Git.
Step 2: Add Continuous Integration First
Before touching deployment, make every push run your linter and test suite automatically. Even a handful of tests is a start. Set your main branch to require a passing build before merging. This alone catches a surprising number of issues and builds trust in automation.
Step 3: Automate Deploys to Staging
Turn your runbook into a script, then have the pipeline run that script against a staging environment on every merge to main. Staging should mirror production as closely as your budget allows: same OS, same runtime versions, similar data shape. Watch it for a week or two. When staging deploys become boring, you're ready for the next step.
Step 4: Move Secrets Out of People's Laptops
Manual deploys often rely on keys stored locally or pasted from chat. Move them into your CI tool's encrypted secrets store or a dedicated secrets manager. Give the pipeline its own credentials with only the permissions it needs, and rotate any keys that were ever shared in plain text.
Step 5: Automate Production, Keep a Manual Approval
Use the exact same script for production that you've been running on staging. Add an approval gate so a named person clicks "deploy" after reviewing what's going out. Your team keeps control, but the steps themselves are now identical every time.
Step 6: Make Rollback a Single Action
A safe pipeline isn't one that never fails. It's one where failure is cheap. Keep the previous build artifact or container image ready, and make redeploying it a single command or button. Add basic health checks after each deploy so problems are caught in minutes. Our hosting and support team often sets this up alongside monitoring for clients.
A Starter GitHub Actions Workflow
Here's a simple example for a Node.js app. It tests every pull request, deploys to staging when code merges to main, then waits for approval before production. The same pattern works in GitLab CI, Bitbucket Pipelines or Azure DevOps.
name: ci-cd
on:
pull_request:
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run lint
- run: npm test
deploy-staging:
needs: test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/checkout@v4
- run: ./scripts/deploy.sh staging
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
deploy-production:
needs: deploy-staging
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- run: ./scripts/deploy.sh production
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}A few notes:
deploy.shis your runbook, turned into a script. Keep it in the repo.- The
productionenvironment is where you add required reviewers in your repository settings, which creates the approval gate. Check that your GitHub plan supports environment protection rules for private repositories. - Secrets live in GitHub's encrypted secrets, scoped per environment, never in the code.
Handling Database Migrations Safely
Database changes are where most automated deployments go wrong, because you can't simply roll back data. A few habits make them safe:
- Run migrations as their own pipeline step, before the new code goes live, and stop the deploy if they fail.
- Make changes backward compatible. Add new columns before code uses them, and remove old ones in a later release. This "expand, then contract" approach lets old and new code run side by side.
- Avoid long table locks on large tables during business hours. Test migration time against a copy of production-sized data.
- Back up before risky changes, and know how long a restore actually takes.
How to Know It's Working
The DORA research program popularized four delivery metrics that work well for teams of any size:
| Metric | What it tells you |
|---|---|
| Deployment frequency | How often you ship to production |
| Lead time for changes | Time from commit to running in production |
| Change failure rate | Share of deploys that cause an incident or need a fix |
| Time to restore service | How fast you recover when something breaks |
Record where you are today, even roughly. After a few months of CI/CD, most teams see deploys become more frequent and smaller, with faster recovery when something does fail.
What CI/CD Really Costs
Automation isn't free, and it's worth being honest about that. Expect to spend time on:
- Initial setup: from a few days for a simple app to a few weeks for systems with many services or complex data.
- Writing tests: the pipeline is only as useful as the checks it runs.
- Maintenance: updating runners, fixing flaky tests and keeping dependencies current.
- CI minutes and hosting: most tools include a free allowance, and small teams often stay within it.
For most teams, that effort pays back quickly in fewer late-night fixes and less time spent babysitting releases. If you'd like a sense of budget for your setup, see our software pricing.
Common Mistakes to Avoid
- Automating a broken process. Fix confusing steps in the runbook first.
- Letting people bypass the pipeline. Once production deploys are automated, remove manual server access for routine releases.
- Ignoring flaky tests. A test that fails randomly teaches the team to ignore red builds. Fix it or remove it.
- Skipping staging "just this once." That's usually the release that breaks.
- Building everything before shipping anything. A basic pipeline running today beats a perfect one planned for next quarter.
Frequently Asked Questions
Do small teams really need CI/CD?
Yes, and arguably more than large ones. Small teams can't afford one person spending hours on each release, or a weekend lost to a bad deploy. A basic pipeline takes a few days to set up and usually pays for itself within the first handful of releases.
What if we don't have many automated tests yet?
Start anyway. Run your linter and build on every push, add smoke tests for the flows that matter most, like login and checkout, and grow coverage over time. A pipeline with a few good checks is far safer than a manual deploy with none.
Should we use continuous delivery or continuous deployment?
Start with continuous delivery and a manual approval for production. Once your tests, health checks and one-click rollback have earned the team's trust, you can let low-risk changes deploy automatically.
Which CI/CD tool should we use?
Usually the one built into your code host: GitHub Actions, GitLab CI, Bitbucket Pipelines or Azure DevOps. They all handle the steps in this guide, and staying on one platform keeps permissions and secrets simpler.
Ready to Stop Deploying by Hand?
Moving from manual deploys to a reliable pipeline is one of the highest-return changes a growing team can make. If you'd like experienced engineers to map your current process and build the pipeline with you, our DevOps & cloud engineering services team can help, from the first CI build to one-click rollbacks. Browse our case studies or book a free consultation.

Written by
Founder & CEO, TechKnoc
Omer Hassan is the Founder & CEO of TechKnoc, started in 2022 to make production-grade AI and custom software accessible to growing businesses. Omer writes practical guides on topics like app development cost, CI/CD for manual deploys, AWS vs Azure vs Google Cloud and infrastructure as code, drawing on 40+ delivered projects and the work behind TechKnoc's custom software and DevOps and cloud services.



