
GitHub Actions Has a Free API That Automates Your Entire Development Workflow
GitHub Actions is the CI/CD platform built into GitHub. Its workflow API automates testing, building, deploying, and everything in between. CI Pipeline: Test on Every Push # .github/workflows/ci.yml name : CI on : push : branches : [ main ] pull_request : branches : [ main ] jobs : test : runs-on : ubuntu-latest strategy : matrix : node-version : [ 18 , 20 , 22 ] steps : - uses : actions/checkout@v4 - uses : actions/setup-node@v4 with : node-version : ${{ matrix.node-version }} cache : npm - run : npm ci - run : npm run lint - run : npm run typecheck - run : npm test -- --coverage - uses : actions/upload-artifact@v4 with : name : coverage-${{ matrix.node-version }} path : coverage/ Deploy on Release name : Deploy on : release : types : [ published ] jobs : deploy : runs-on : ubuntu-latest environment : production steps : - uses : actions/checkout@v4 - uses : actions/setup-node@v4 with : node-version : 20 cache : npm - run : npm ci - run : npm run build - name : Deploy to Cloudflare use
Continue reading on Dev.to DevOps
Opens in a new tab



