Development · Term

CI/CD

CI/CD (continuous integration and continuous delivery or deployment) is the practice of automatically testing every code change and then automatically preparing or releasing it, so updates reach the live site in small, checked steps.

Continuous integration means every change a developer pushes to the shared code in Git is automatically built and tested, so problems are caught within minutes rather than at release time. Continuous delivery means each change that passes is ready to go live at the press of a button. Continuous deployment goes one step further and releases it automatically.

CI/CD is a practice supported by tools, not a single product. The tools run a pipeline, a scripted list of steps, on services such as GitHub Actions, GitLab CI or a hosting platform's own build system.

How it works

A developer pushes a change to the repository. The CI service notices, starts a clean temporary machine, downloads the code, installs its dependencies and runs the checks defined for the project: automated tests, code-quality checks, a check that the site builds, sometimes a speed or accessibility test. If any step fails, the change is marked as broken and the developer is told.

If everything passes, the delivery part takes over. The pipeline builds the final version of the site, compresses and minifies its files, and either deploys it to a staging site for review or, with continuous deployment, straight to the live server. Many teams deploy automatically to staging and require a person to approve the release to live.

A pipeline is only as good as its checks. One with no tests simply automates the copying of broken code faster. The value grows as the team adds tests for the things that must never break, such as the contact form, the checkout or the login. Pipelines also need care over time: the tools they install are updated, build services change their settings, and a pipeline left untouched for a year sometimes fails for reasons that have nothing to do with the site's own code.

Example

A marketing agency maintains a client's site built with a static site generator. Each time a developer pushes a change, the pipeline builds the site, checks every internal link and confirms that each page has a title and meta description. A change that would have left twenty broken links after a page was renamed fails the check before it reaches the client.

When a change passes, it is deployed automatically to a preview address so the client can review it on their own phone. Once they approve, a developer clicks to release it, and the pipeline deploys the same tested build to the live site rather than building a new one, so what the client approved is exactly what goes live. No one copies files by hand, and every release is recorded.

Why it matters for your business

CI/CD makes updates cheaper and safer, so small improvements get shipped instead of piling up into risky big releases. It also leaves a record of what was released and when, which helps when tracking down a problem. The trade-off is setup and upkeep: a pipeline needs configuring, tests need writing, and build services can charge for usage beyond a free allowance. For a small site changed a few times a year, a simple, careful manual process may be enough. For a site or app changed every week, automation usually pays for itself in avoided mistakes.

Common mistakes

  • Setting up a pipeline with no meaningful tests and assuming that green means the site works.
  • Letting a failing check become normal and ignoring it until real problems hide behind it.
  • Deploying automatically to live without any review for changes that affect payments or customer data.
  • Storing secrets in the pipeline configuration file instead of the service's protected secrets settings.

Questions people ask

What is the difference between continuous delivery and continuous deployment?

With continuous delivery, every change that passes the checks is ready to release, but a person decides when it goes live. With continuous deployment, passing changes go live automatically with no manual step. Both share the same automated testing and building beforehand.

Does a small business website need CI/CD?

Not always. A site changed rarely, or managed entirely through a CMS, can do without it. Once custom code changes regularly, even a simple pipeline that builds, checks and deploys the site removes many common mistakes for little ongoing cost.

How much does CI/CD cost?

Many hosting platforms and code-hosting services include build minutes for free or in their plans, which is usually enough for a small site. Costs rise with build time and frequency. The larger cost is the developer time to set up the pipeline and write useful tests.

Related terms

Have something worth building right?