CI/CD automates the software release process. Continuous Integration merges code changes frequently, running automated tests. Continuous Delivery deploys validated changes to staging/production.
GitHub Actions: define workflows in .github/workflows.yml. Trigger on push, pull request, or schedule. Jobs run on virtual machines with steps for build, test, and deploy.
Pipeline stages: lint (code quality), test (unit + integration), build (compile/bundle), deploy (push to server). Each stage catches different issues.
Environment management: use secrets for API keys and credentials. Deploy to different environments (dev, staging, production). Use environment protection rules.
Testing in CI: run fast tests first (unit), then slower tests (integration, E2E). Parallelize test suites for speed. Cache dependencies between runs.
Deployment strategies: blue-green (zero downtime), canary (gradual rollout), rolling (update instances one by one). Choose based on risk tolerance.