Production Deployment and CI/CD
Prerequisites: Testing, Build tools and bundlers
CI/CD (Continuous Integration/Continuous Deployment) automatically runs a project's tests and deploys it whenever code changes — instead of manually running tests and copying files to a server by hand.
# .github/workflows/test.yml
name: Tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install
- run: npm test
- run: npm run build
This runs the full test suite and production build automatically on every push — catching a broken change before it ever reaches production.