A software development workflow where engineers manually build Docker images on their laptops and run scp to upload files to cloud servers is dangerous and unscalable. Modern cloud engineering mandates Automated Continuous Integration and Continuous Deployment (CI/CD) Pipelines that trigger on every Git commit, test every pull request, and deploy to production with automated health checks.
Elite engineering teams deploy to production multiple times a day because every commit runs through automated test gates, container builds, security scans, and rolling releases without manual delays.
Here is an enterprise-grade GitHub Actions pipeline (.github/workflows/deploy.yml) using OpenID Connect (OIDC) to authenticate securely to AWS without storing permanent access keys:
name: Production CI/CD Cloud Pipeline
on:
push:
branches: [ "main" ]
permissions:
id-token: write # Required for secure OIDC role assumption
contents: read
jobs:
test-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code Repository
uses: actions/checkout@v4
- name: Setup Node.js Runtime
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Run Automated Unit Tests
run: |
npm ci
npm test
- name: Configure AWS Credentials via OIDC (No Static Keys!)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::123456789012:role/GitHubActionsDeploymentRole
aws-region: us-east-1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Build, Tag & Push Docker Container Image
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t $REGISTRY/veewom-api:$IMAGE_TAG .
docker push $REGISTRY/veewom-api:$IMAGE_TAG
- name: Deploy to Cloud Run / ECS
run: |
echo "Triggering zero-downtime rolling deployment with image tag: ${{ github.sha }}"
npm audit, Trivy, and SonarQube inspect open-source dependencies for known CVE vulnerabilities.latest in production!).Broaden your enterprise cloud architecture and DevOps expertise across our curriculum:
Understand continuous integration best practices, trunk-based development, and test automation.
Transition from push-based CI/CD pipelines to pull-based GitOps automated cluster synchronization.
Step-by-step project: Configure a full GitHub Actions workflow building Docker images and deploying to AWS.
Resolve failing deployment pipelines, container registry authentication errors, and rollbacks.