Development

šŸ› ļø Our DevOps Workflow: Cloud Build, Cloud Run & GitHub Actions for Fast & Secure Deployments

Complete guide to automated CI/CD pipeline with Google Cloud Build, Cloud Run, and GitHub Actions

devopscloud-buildcloud-rungithub-actionsci-cddeploymentdockerartifact-registrysecrets-managermonitoring
Dezoko Team
•
February 5, 2025
•
6 min read

Table of Contents

šŸ› ļø Our DevOps Workflow: Cloud Build, Cloud Run & GitHub Actions for Fast & Secure Deployments

šŸ› ļø Our DevOps Workflow: Cloud Build, Cloud Run & GitHub Actions for Fast & Secure Deployments


Shipping code is easy.

Shipping secure, tested, auto-deployed code -- on time, at scale, with rollback and monitoring -- is hard.


At Dezoko, we've built a powerful DevOps pipeline using:

  • āœ…Google Cloud Build
  • āœ…Cloud Run
  • āœ…GitHub Actions
  • āœ…Artifact Registry + Secrets Manager
  • āœ…Uptime monitoring + Slack alerts

This system powers dozens of our projects -- from startup MVPs to enterprise APIs -- and helps us ship faster, with fewer bugs, and with full confidence.


Here's exactly how it works.


šŸš€ The Tools We Use


Tool
Purpose
GitHub Actions
CI (runs tests, linting, Docker build trigger)
Cloud Build
CD (builds container, deploys to Cloud Run)
Cloud Run
Serverless container hosting
Artifact Registry
Store production-ready Docker images
Secrets Manager
Store API keys, DB passwords, tokens securely
Cloud Logging & Uptime
Monitor service health and performance

šŸ”„ Our DevOps Pipeline (Step-by-Step)


1. Developer pushes code → GitHub


  • āœ…Feature branches, PR-based workflow
  • āœ…Auto run of `unit tests + lint + Dockerfile checks`
  • āœ…On `main` or `prod` branch merge → triggers GitHub Action

2. GitHub Action triggers Cloud Build


# Example .github/workflows/deploy.yml
on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Trigger Cloud Build
        run: |
          gcloud builds submit --config=cloudbuild.yaml --substitutions=_REGION=asia-south1

3. Cloud Build builds + deploys container


# Example cloudbuild.yaml
steps:
  - name: 'gcr.io/cloud-builders/docker'
    args: ['build', '-t', 'REGION-docker.pkg.dev/PROJECT/image:latest', '.']

  - name: 'gcr.io/cloud-builders/docker'
    args: ['push', 'REGION-docker.pkg.dev/PROJECT/image:latest']

  - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
    args:
      - run
      - deploy
      - service
      - my-service
      - --image=REGION-docker.pkg.dev/PROJECT/image:latest
      - --region=asia-south1
      - --platform=managed

ā˜ļø Image gets pushed to Artifact Registry

šŸš€ Cloud Run updates without downtime


4. Slack + Email notifications (Optional)


  • āœ…Slack webhook integration
  • āœ…Notify on:

  • Successful deploy
  • Failure
  • Rollbacks
  • Test coverage drops

5. Post-Deploy Monitoring


  • Cloud Monitoring: latency, error %, memory/CPU
  • Cloud Logging: structured logs with `requestId`, `userId`
  • Alerting policies: if error rate > 5%
  • Uptime checks + response time graphs
  • Optional: push alerts to Slack or Opsgenie

🧱 Real Use Case: B2B API SaaS


Stack:


  • Nuxt frontend → Firebase Auth
  • Cloud Run backend (Node.js)
  • PostgreSQL (Cloud SQL)
  • BigQuery + Firebase for analytics
  • Stripe for billing
  • Full CI/CD as described above

šŸš€ We ship to production multiple times daily, and maintain 99.99% uptime with full logging + observability.


šŸ’” Why This Workflow Works for Us


  • āœ…Zero-downtime deploys
  • āœ…No DevOps engineer needed for small teams
  • āœ…Rollback via Git commit revert
  • āœ…Secure secrets handling
  • āœ…Full control with YAML and CLI
  • āœ…Scales with your app and team size

šŸ’¬ What Clients Say


> "They built a fully automated pipeline for us -- now we can deploy anytime, from anywhere, with no risk."

> -- CTO, Fintech Platform


> "Our time-to-release dropped by 70% after they set up this pipeline."

> -- Product Lead, SaaS App


šŸ“ž Want to Automate Your Deployments?


We help you:

  • āœ…Set up end-to-end CI/CD with Cloud Run + GitHub
  • āœ…Migrate from legacy deployments
  • āœ…Integrate test + staging environments
  • āœ…Add monitoring, logging, alerts, and rollback flows


Get a free consultation