GitHub Actions CI/CD: Testing, Docker Builds, Vercel Deploys, and Security Scanning
GitHub Actions can do a lot more than run your test suite. With the right workflow design, it becomes an autonomous deployment pipeline that tests, builds, scans for vulnerabilities, deploys, and n...

Source: DEV Community
GitHub Actions can do a lot more than run your test suite. With the right workflow design, it becomes an autonomous deployment pipeline that tests, builds, scans for vulnerabilities, deploys, and notifies — without manual intervention. The Complete CI/CD Workflow # .github/workflows/ci.yml name: CI/CD on: push: branches: [main, develop] pull_request: branches: [main] jobs: test: runs-on: ubuntu-latest services: postgres: image: postgres:15 env: POSTGRES_DB: testdb POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 20 cache: npm - run: npm ci - run: npx prisma migrate deploy env: DATABASE_URL: postgresql://postgres:postgres@localhost:5432/testdb - run: npm test env: DATABASE_URL: postgresql://postgres:postgres@localhost:5432/testdb build: needs: test runs-on: ubuntu-latest steps: - uses: actions/checkout