In this guide
For a small team, shipping software often means a person copying files to a server on a Friday afternoon and hoping. A CI/CD pipeline replaces that ritual with a repeatable machine: every change is built, tested, scanned, deployed and, if something goes wrong, rolled back in the same way every time. CI stands for continuous integration and CD for continuous delivery or deployment. This guide explains what each stage of a CI/CD pipeline for a small team actually does, using GitHub Actions as the example tool, and how to build one without over-engineering it. To watch a pipeline run, fail a stage and roll back on sample data, open the simulated engineering demo.
What a pipeline is, in plain English
A pipeline is an automated checklist that runs whenever someone changes the code. Instead of relying on memory ("did I run the tests?"), the system runs the same steps in the same order and stops at the first problem. The result is a clear signal: this change is safe to release, or it is not, and here is why.
It helps to separate two ideas. Continuous integration means every change is merged into the shared code often and checked automatically, so problems are found while they are small. Continuous delivery means the checked change is always ready to release at the push of a button. Continuous deployment goes one step further and releases automatically when all checks pass. A small team can start with integration, add delivery, and choose deployment only for the parts where it is comfortable.
The main benefit is not speed, it is confidence. Teams that trust their pipeline release smaller changes more often, and small changes are easier to understand, test and undo.
The stages at a glance
| Stage | What it does | Stops the pipeline when |
|---|---|---|
| Trigger | Starts the run on a push, pull request or schedule. | Not applicable. |
| Build | Installs dependencies and compiles or bundles the application. | The code does not build. |
| Test | Runs unit, integration and a few end-to-end tests. | A test fails. |
| Scan | Checks code and dependencies for known security problems and leaked secrets. | A serious finding appears. |
| Package | Produces the artefact that will be deployed, such as a container image. | Packaging fails. |
| Deploy | Releases the artefact to staging and then production. | The deploy or its health check fails. |
| Verify and roll back | Runs smoke tests and watches health, and reverts if needed. | Health checks fail after release. |
Stage 1: Trigger
The trigger decides when the pipeline runs. For most teams the useful triggers are a pull request (run build, test and scan before merge), a merge to the main branch (run the whole pipeline and deploy), and a schedule (run a nightly full test suite and dependency scan). In GitHub Actions these are written in a workflow file under .github/workflows, using the on: section for pull_request, push and schedule. Keep triggers simple. A pipeline that nobody understands will be bypassed.
Stage 2: Build
The build stage turns source code into something runnable. It fetches dependencies, compiles or bundles the code and fails quickly if that cannot be done. Two habits make it faster and more reliable. First, cache dependencies so the same packages are not downloaded on every run. Second, build once and reuse the result: the artefact you test should be the artefact you deploy, not a fresh rebuild that might differ.
Pin versions of tools and dependencies, and use a lock file. A build that works today and fails tomorrow because a library updated overnight is one of the most irritating problems in small teams, and pinning removes most of it.
Stage 3: Test
Tests are the pipeline's conscience. A healthy suite has many fast unit tests, fewer integration tests that check how parts work together, and a small number of end-to-end tests that follow a real user journey. Run the fast ones first so a mistake fails the pipeline in a minute rather than twenty. Our guide to test automation covers what to automate first and how to keep tests trustworthy.
Make test output easy to read. Show which test failed, the message and a link to logs or screenshots. A failed pipeline that needs a detective to interpret is a pipeline people learn to ignore.
Stage 4: Scan
Security checks belong inside the pipeline, not at the end of the project. This is the idea behind DevSecOps. For a small team, four scans give most of the value:
- Dependency scanning: checks libraries for known vulnerabilities.
- Secret scanning: looks for passwords, keys and tokens committed to the code by mistake.
- Static analysis (SAST): reads the code for risky patterns, such as building database queries from user input.
- Container and configuration scanning: checks images and infrastructure files for weak settings.
Decide in advance what blocks a release. A sensible start is to fail on high and critical findings with a known fix, and to report lower ones without stopping work. If every warning blocks the build, people will find a way around the scanner. For wider security work, such as reviews and readiness, see the security demos.
Stage 5: Package and deploy
Packaging produces the thing you will release, often a container image tagged with the commit identifier so you can always say exactly which code is running. Deployment then moves it through environments. A small team can keep this to two steps: deploy to staging automatically, run smoke tests, then deploy to production, either automatically or after a human clicks approve.
Use environment protection for production. GitHub Actions supports environments with required reviewers, so a change cannot reach production without approval from a named person. Store credentials as encrypted secrets, and prefer short-lived credentials issued through your cloud provider's identity federation over long-lived keys saved in the repository.
Choose a deployment strategy that suits the risk. A rolling update replaces servers a few at a time. A blue-green setup keeps the old version running beside the new one so you can switch traffic back instantly. A canary release sends a small share of traffic to the new version first. For most small applications, a rolling update with a health check is enough.
Stage 6: Verify and roll back
Deployment is not finished when the files are copied. It is finished when the new version is shown to be healthy. A post-deploy step should run a few smoke tests against the live address, check that the key pages and the main API respond, and watch error rates for a short period. If any check fails, the pipeline should revert automatically or make reverting a single click.
Plan rollback before you need it. There are three common ways to do it:
- Redeploy the previous artefact. Because every build is tagged and stored, you can release the last known good version in minutes.
- Switch traffic back. In a blue-green setup, point the router at the old environment again.
- Turn off a feature flag. If the risky change is behind a flag, switch it off without redeploying anything.
The tricky part is the database. A change that adds a column is easy to reverse, while one that deletes or reshapes data may not be. Write database changes so that old and new code can both work during the release (add first, remove later), and take a backup before risky migrations. The backup and recovery guide explains how to think about that safety net.
A minimal GitHub Actions layout
You do not need a hundred lines of configuration. A small team can start with two workflows. The first runs on every pull request: install dependencies with caching, run build, unit tests and the scans, and report the result on the pull request. The second runs on merge to the main branch: build and package, deploy to staging, run smoke tests, wait for approval on the production environment, deploy, and run post-deploy checks. Each job is a short list of steps, and a failing step stops the rest.
A few practical tips keep this healthy:
- Keep each pipeline run under about ten minutes if you can. Slow pipelines are skipped.
- Require the pipeline to pass before merging, using branch protection rules.
- Give every workflow the minimum permissions it needs rather than broad defaults.
- Pin third-party actions to a specific version or commit, because they run code in your pipeline.
- Store build artefacts and logs for a sensible period so you can investigate old releases.
- Keep the workflow files in the repository and review changes to them like code.
Common mistakes
The first is building a heroic pipeline before there are tests. A pipeline that only compiles gives false comfort. The second is letting flaky tests, which pass and fail without any code change, train the team to press "re-run". The third is treating failures as someone else's problem. Whoever merged the change should fix the red build first, or revert it. A fourth is giving the pipeline powerful production credentials without protections, which turns a build server into an attractive target. Finally, many teams forget to practise rollback, then discover during an incident that the steps do not work.
For Irish and EU teams: choose build runners and deployment targets with data location in mind. Hosted runners process your source code and any test data you give them, so use synthetic or anonymised data in tests rather than real customer records, and check the data processing terms of your tooling. Deploy workloads that handle personal data to an EU region and keep logs and artefacts in a place you can name under GDPR. Secure software supply chains are also a feature of NIS2, which may reach you through customer contracts even before national rules are final; the Irish bill had not yet been enacted at the time of writing, so check official sources. Teams elsewhere should apply the same care with their own regional rules.
What to do this week
If you have no pipeline, start with one thing: a workflow that runs your tests on every pull request and blocks merging when they fail. Next, add a dependency and secret scan. Then automate deployment to staging. Only after that, add production deployment and rollback practice. Try the simulated pipeline demo to see failing stages and rollbacks on sample data, read about observability basics so you know when a release has gone wrong, and see how Zenocta approaches this on the cloud and DevOps page. If you would like help designing a first pipeline, get in touch. A pipeline is a habit encoded in a file, and the earlier you start it the cheaper it is to keep.
Try it live
Open the real thing: demos run in a new tab with sample data, apps link to their own page.
- ELive demoEngineering demo: pipeline, cost, monitoringSimulated CI/CD, cost, observability, DR and test views on sample data. Nothing is sent or saved.
- CServiceCloud and DevOps serviceHow Zenocta approaches migration, pipelines, monitoring and recovery.
- SLive demoSecurity and compliance demosSimulated checklists and readiness views, informational only.
- ZBrowse allZenocta servicesCloud, DevOps, QA, security, data and automation for growing teams.
- TBrowse allTalk about your setupDescribe your systems and we will suggest a sensible first step.
Frequently asked questions
01What does CI/CD stand for?
CI is continuous integration: merging and automatically checking changes often. CD is continuous delivery, keeping every checked change ready to release, or continuous deployment, releasing automatically when all checks pass.
02Is GitHub Actions a good choice for a small team?
It is a common choice because it lives next to your code, has a large library of ready-made steps and a simple file format. GitLab, Jenkins and others work too; the stages matter more than the tool.
03What should a pipeline scan for?
Start with vulnerable dependencies, secrets committed by mistake, risky code patterns and weak container or infrastructure settings. Decide in advance that high and critical findings with a known fix block the release.
04How do we roll back a bad release?
Redeploy the previous tagged artefact, switch traffic back to the old environment in a blue-green setup, or turn off a feature flag. Plan database changes so old and new code both work during the release.
05How many tests do we need before automating deployment?
Enough to cover your critical user journeys and business rules. A pipeline that only compiles gives false comfort, so start with a small, trusted set of tests and grow it as bugs are found.


