Git CI/CD Pipeline Basics
In this page:
What is CI/CD?
CI/CD stands for Continuous Integration and Continuous Deployment. It is the practice of automating the testing, building, and deployment of your code on every commit. This keeps your utility tools on cookiescursor.com stable and error-free.
Example: What is CI/CD?
# .github/workflows/ci-cd.yml
on: push
jobs:
build:
runs-on: ubuntu-latest
Automating Tests on Push
Continuous Integration means running your test suite automatically on every push, so a broken change gets flagged within minutes rather than being discovered days later when someone else's work collides with it.
Example: Automating Tests on Push
on:
push:
jobs:
test:
steps:
- run: npm test
Managing Build Artifacts
Once tests pass, the pipeline can compile the project and upload the resulting binaries or archives as build artifacts — downloadable from the run's summary page, and reusable by a later deployment step without rebuilding from scratch.
Example: Managing Build Artifacts
steps:
- run: npm run build
- uses: actions/upload-artifact@v4
with:
name: build
path: dist/
Integrating Environment Secrets
Hardcoding an API key or database password directly in a workflow file exposes it to anyone who can read the repository. Repository secrets are encrypted at rest and only injected as environment variables during the run, keeping them out of the actual source code.
Example: Integrating Environment Secrets
steps:
- run: deploy.sh
env:
API_KEY: ${{ secrets.API_KEY }}
Pipeline Status Badges
You can display your active build status directly inside your README.md file using an markdown status badge. This shows visitors if your codebase is currently compiling successfully.
Example: Pipeline Status Badges

Chapter Quiz — Complete all 5 topics to unlock
0/5 topics done
Complete these topics first: