Skip to content
managing-deployment logo

Managing Deployment

managing-deployment

Deployment and infrastructure for the site. Consult when troubleshooting deployments, modifying CI/CD, or diagnosing build issues.

SKILL.md

Full skill instructions

Managing Deployment

Deployment and infrastructure maintenance for the site.

When to Use

Consult this skill when troubleshooting failed deployments, modifying the GitHub Actions workflow, or diagnosing build issues. The gcloud and GitHub MCP servers are available for direct Cloud Run and repository operations.

Architecture

Every push triggers deployment via GitHub Actions:

  • main branch → Production (100% traffic)
  • other branches → Preview (tagged revision, no traffic)

Key Files

FilePurpose
.github/​workflows/​deploy.ymlCI/​CD workflow
DockerfileMulti-stage Docker build

Pre-Deployment Verification

Before pushing, verify the build will succeed:

npm run check     # TypeScript and Astro checks
npm run lint      # ESLint
npm run build     # Full production build

If npm run build succeeds locally, the Docker build should succeed in CI.

Docker Build

Multi-stage build defined in Dockerfile:

  1. Build stage: Installs all dependencies, runs npm run build
  2. Runtime stage: Production dependencies only, copies built output

Check the Dockerfile for current Node version and port configuration.

Diagnosing Build Failures

TypeScript Errors

npm run check

Fix all errors before pushing.

ESLint Errors

npm run lint --fix

Missing Dependencies

If build fails with module not found:

  1. Check the import path is correct
  2. Verify package is in package.json dependencies (not devDependencies if needed at runtime)
  3. Run npm install locally to verify

Astro Build Errors

Common causes:

  • Invalid frontmatter in MDX files
  • Missing required props in components
  • Circular imports

Run npm run build locally to see full error output.

Workflow Structure

The workflow in .github/​workflows/​deploy.yml:

  1. Checkout code
  2. Determine if production or preview (branch name)
  3. Authenticate to Google Cloud
  4. Build and push Docker image to Artifact Registry
  5. Deploy to Cloud Run with appropriate traffic settings

Production vs Preview

Production (main branch):

  • Receives 100% traffic immediately
  • Replaces previous production revision

Preview (other branches):

  • Tagged revision with no traffic
  • Accessible via tag URL: https://{tag}---{service-name}-{hash}.run.app (service name from workflow env section)
  • Branch names are sanitised for Cloud Run (lowercase, alphanumeric + hyphens)

Cloud Run Configuration

Settings defined in .github/​workflows/​deploy.yml:

  • Region, service name, registry: env section at the top of the workflow
  • Memory, instances, port: flags section in deploy steps

When modifying deploy flags, keep production and preview steps in sync.

Required Secrets

GitHub repository secrets:

SecretPurpose
GCP_PROJECT_IDGoogle Cloud project ID
GCP_SA_KEYService account JSON key

If deployment fails with authentication errors, these secrets may need regenerating.

Checking Deployment Status

With gcloud MCP (mcp__gcloud__run_gcloud_command):

  • gcloud run services describe — service status and URL
  • gcloud run revisions list — list revisions
  • gcloud run services logs read — view logs

Region and service name are in the workflow's env section.

With GitHub MCP:

  • mcp__github__list_commits — verify what's been pushed
  • mcp__github__pull_request_read with get_status — check PR CI state

Modifying the Workflow

When editing .github/​workflows/​deploy.yml:

  • Keep production and preview deploy steps in sync (same flags)
  • Test workflow changes on a branch first (creates preview deployment)
  • Validate YAML syntax before committing

More DevOps & CI/CD skills

Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.

6K 472.6K
View

Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.

6K 472.6K
View

Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.

1.5K 454.3K
View
azure-kubernetes logo
DevOps & CI/CD

azure-kubernetes

Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.

1.5K 447.1K
View

Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.

92.7K 354.9K
View
just-scrape logo
DevOps & CI/CD

just-scrape

Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.

69 245K
View

Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.

462 159.7K
View

Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.

462 159.1K
View
deploy-to-vercel logo
DevOps & CI/CD

deploy-to-vercel

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

31.9K 146.6K
View
programmatic-seo logo
DevOps & CI/CD

programmatic-seo

Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.

53.3K 140.1K
View

Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.

63 123.5K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View

Coding & apps AI tools

Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View
I
Coding & apps

Imagica

Build a no-code AI app in minutes.

Freemium
View
E
Coding & apps

Emergent.sh

An IDE for code migration from legacy to modern frameworks through coding agents.

Freemium
View
Wonder Dynamics logo
Coding & apps

Wonder Dynamics

Automate CGI animation in live-action scenes

Paid
View
M
Coding & apps

Mixo

Launch a website in seconds with AI.

Paid
View
AI Code Convert logo
Coding & apps

AI Code Convert

Streamline Your Coding Experience with AI Code Helper

Free
View