본문으로 건너뛰기
cccskills
무료GitHub에 공개

cloud-deploy-gcp-aws

Use when a web/frontend app needs a cloud deploy - GitHub Actions to Cloud Run/ECS for SSR or GCS+CDN/Firebase and S3+CloudFront for static, with build-time env and cache invalidation

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md3.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Cloud Deploy — GCP & AWS (web)

Overview

A web deploy's shape follows the render mode, not the framework. Server-rendered (Next.js SSR, SvelteKit node) ships a container exactly like a backend service; a static export (Next.js output: 'export', Vite build) ships files to object storage behind a CDN. Pick the mode first. Read [[ci-cd-pipeline-authoring]] for the workflow naming/dispatch contract this fills in.

Core principle: Match the deploy target to the render mode, bake public config at build time, and invalidate the CDN on every deploy — a stale edge cache is the most common "I deployed but nothing changed."

Pick the target, then copy the boilerplate

search_boilerplate_catalog → deploy gcp web / deploy aws web. Copy its deploy-stage/preprod/prod.yml into .github/workflows/ as <id>-deploy-<env>.yml, then set the README's repo/environment vars. OIDC auth, no keys.

SSR (containerized)

Build the image, push it, then deploy it:

  • GCP: google-github-actions/auth with Workload Identity Federation (no key JSON), then gcloud run deploy $SERVICE --image $IMAGE --region $REGION to Cloud Run. The revision URL is what you smoke-test.
  • AWS: aws-actions/configure-aws-credentials with role-to-assume (OIDC), push to ECR, then deploy via ECS Express Mode (AWS's current recommended default) or ECS Fargate with aws-actions/amazon-ecs-deploy-task-definition (wait-for-service-stability: true) for more control.

Use this path when the app has server components, API routes, or ISR.

Static (object storage + CDN)

  • GCP: either Firebase Hosting (firebase deploy --only hosting, simplest, CDN + rollback built in) or a GCS bucket + Cloud CDN / load balancer; after upload, invalidate the CDN.
  • AWS: sync the build output to an S3 bucket and serve via CloudFront; after aws s3 sync, run aws cloudfront create-invalidation --paths '/*'.
  • Set long cache TTLs on hashed assets and no-cache on index.html so a deploy is picked up immediately.
  • Next.js static export is output: 'export' in next.config (the next export CLI command was removed) — keep the build step producing the out/ directory the sync step uploads.

Build-time env

  • Public config is inlined at build time (NEXT_PUBLIC_*, VITE_*) — it is baked into the bundle, so the build job for each environment sets that environment's values from vars. You cannot change a NEXT_PUBLIC_ value after build without rebuilding.
  • Never put a secret in a NEXT_PUBLIC_/VITE_ var — it ships to the browser. Secrets belong to the server (SSR) or a backend, never the static bundle.

Health-check gate

End the job by fetching the deployed URL (SSR health route, or the static site's index.html) and fail on non-200 / missing marker. A failing smoke step fails the deploy — the release goes failed and the release engineer rolls it back; only finish_release moves a task to released.

Common Mistakes

  • Static deploy with no CDN invalidation → users keep the old bundle.
  • Aggressive caching on index.html → new asset hashes never get requested.
  • A secret in a NEXT_PUBLIC_ var, shipped to every visitor's browser.
  • Rebuilding per env is skipped and one bundle is promoted across envs with the wrong baked config.
  • Calling the removed next export CLI command instead of setting output: 'export'.

Red Flags

  • No create-invalidation / hosting cache bust after a static upload.
  • Public build vars holding tokens or keys.
  • Deploy triggers on push for preprod/prod instead of workflow_dispatch (unless the component's delivery profile is genuinely on_merge).

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when writing acceptance criteria for a task - express each as an observable Given/When/Then that QA can execute, including negative cases

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

makifbaysal/tasktrooper1172026년 10월 20일 업데이트

Use when the diff adds or changes an endpoint, resolver, RPC, job or query that takes an object id, a role check, a request binding or a tenant filter - BOLA/IDOR, function-level authorization, mass assignment and tenant scoping

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

makifbaysal/tasktrooper1172026년 10월 20일 업데이트

Use on every UI change - semantic HTML, labels for controls, keyboard-navigable dialogs/menus, visible focus, and never color as the only signal

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

makifbaysal/tasktrooper1172026년 10월 20일 업데이트

Use when a task changes any screen, form, dialog, menu or control - Lighthouse/axe scan of the changed screens, a keyboard walk, and the thresholds that fail a task

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

makifbaysal/tasktrooper1172026년 10월 20일 업데이트

How to work a task returned with review, QA or UAT findings. Use when a task is in need_revision or PR review comments are in your context.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

makifbaysal/tasktrooper1172026년 10월 20일 업데이트

Use when the repository keeps its alerting in code, or a person asks for alerts outside TaskTrooper - PrometheusRule YAML, a Cloud Monitoring alert policy in Terraform, a Datadog monitor, each routed to TaskTrooper's alert ingest URL so it opens an incident here

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

makifbaysal/tasktrooper1172026년 10월 20일 업데이트

makifbaysal의 스킬 모두 보기

이 스킬의 문제 신고