The core idea: instead of a team collecting weeks of changes and discovering all the conflicts at once, everyone merges small changes often and a machine checks each one as it lands. Deploying then becomes a routine, boring step, which is exactly the point.
The usual stages
- Push: a developer pushes changes to the repository, for example on GitHub.
- Build: install dependencies and build front-end assets:
npm ci && npm run buildorcomposer install. - Test: run the automated tests; any failure stops the pipeline.
- Deploy: ship the passing version to a staging site or to production.
Popular tools include GitHub Actions, GitLab CI and Jenkins.
Example: test a Node.js project on every push
Save this as .github/workflows/tests.yml:
name: tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm ci
- run: npm test
Each push now gets a pass or fail mark next to the commit on GitHub, so code that breaks the tests doesn’t get merged.
Common mistakes
- Secrets in the YAML file: keep them in Secrets and read them in your steps as environment variables.
- A pipeline without real tests: it just ships bugs to production faster.
- Forgetting post-deploy steps: database migrations, clearing caches.
- A build environment that differs from the server: use the same Node.js or PHP version in CI as in production, or tests pass while the site breaks.
On ArabyHost
The deploy step can be cPanel’s Git Version Control with a .cpanel.yml file at the repository root, which lists the commands that copy files into your site folder on each deployment: see the cPanel Git deployment guide. AI/Developer plans include SSH, so the last step of your pipeline can connect with an SSH key stored in Secrets and run commands such as git pull and composer install. Node.js 20 and 24 and PHP 8.1 to 8.3 are available, so pin the same version in your workflow.
FAQ
What's the difference between continuous delivery and continuous deployment?
With continuous delivery every version is ready to ship, but releasing to production needs a manual approval. With continuous deployment every version that passes the tests goes live automatically.
Does a small site need CI/CD?
Not at first, but even a simple step such as deploying through Git instead of uploading files by hand cuts mistakes and makes rolling back easy.
Where do I keep the passwords my pipeline needs?
In your CI tool's encrypted secrets, such as GitHub Actions Secrets. Never write them into the workflow file in the repository.