skills/gh-deploy-pipeline/SKILL.md
Set up or align a GitHub Actions deploy pipeline for a running app or service. Use when standardizing repos around the verify-then-deploy shape: push to main -> detect affected lanes -> verify and build artifacts -> e2e -> deploy each lane through a GitHub Environment using OIDC or environment-scoped credentials, with non-cancellable per-environment deploy concurrency. Pairs with `gh-release-pipeline` for versioned packages; use for deploying running apps, not publishing artifacts to a registry.
npx skillsauth add uinaf/skills gh-deploy-pipelineInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Push-to-main, lane-aware, artifact-driven. Detect what changed, build it once, run e2e against the built artifact, then promote that same artifact through a GitHub Environment. Deployment specifics belong in the target platform or infrastructure repo; this skill owns the workflow contract, trust boundaries, and verification loop.
push to main
-> detect-changes (paths-filter or graph-aware affected detection)
-> verify-<lane> (lint + typecheck + test + build -> upload artifact)
-> e2e-<lane> (download artifact, run e2e against it)
-> deploy-<env>-<lane> (environment-scoped credentials + OIDC -> promote artifact)
-> smoke-<env>-<lane> (read-only job, no deploy credentials -> hit deployed URL)
Each lane is independent: a web-only change builds and deploys only web, leaving api untouched. Verify and e2e jobs may cancel superseded runs; deploy jobs use a non-cancellable concurrency group per (environment, lane) so two pushes never race the same target.
A separate deploy.yml (workflow_dispatch) may re-deploy an existing artifact or image for a validated ref, environment, and lane. It reuses the same environment, concurrency group, and provenance checks; it does not rebuild arbitrary input code.
.github/workflows/*, environment names, deploy scripts, infra entrypoints, release dashboards, and recent failing runs. Preserve a proven workflow contract only when it already uses environment gates, OIDC or scoped credentials, immutable artifacts, and post-deploy proof..github/workflows/main.yml and optionally .github/workflows/deploy.yml per references/workflows.md. Keep changes -> verify -> e2e -> deploy -> smoke; manual dispatch promotes existing verified artifacts/images.actionlint for syntax, zizmor for GitHub Actions security, and scanner-backed gates for secret/security checks. See references/workflows.md.dorny/paths-filter pinned to a full SHA for simple per-app rules, or a graph-aware affected walker for monorepos. Output one boolean per deploy lane.(environment, lane) so a staging web deploy does not block production web, but two production web deploys serialize.actionlint for workflow syntax and expression mistakes.zizmor for GitHub Actions security before writing custom grep, awk, or TypeScript workflow validators.zizmor, actionlint, gitleaks, TruffleHog, CodeQL, dependency scanners) over repo-specific guard scripts unless a scanner cannot express the risk.zizmorcore/zizmor-action by full SHA with a same-line version comment. Example: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6.advanced-security: false, annotations: true, and block on at least min-severity: medium plus min-confidence: medium.deploy-web:
needs: [verify-web, e2e-web]
if: ${{ needs.verify-web.result == 'success' && needs.e2e-web.result == 'success' }}
environment:
name: production
url: ${{ steps.smoke.outputs.url }}
concurrency:
group: deploy-production-web
cancel-in-progress: false
permissions:
contents: read
id-token: write
env:
AWS_DEPLOY_ROLE_ARN: ${{ vars.AWS_DEPLOY_ROLE_ARN }}
AWS_REGION: ${{ vars.AWS_REGION }}
steps:
- uses: actions/download-artifact@<full-sha> # v8.x.y
with: { name: web-dist, path: apps/web/dist }
- run: vp exec -- sst --config infra/web/sst.config.ts deploy --stage production
smoke-web:
needs: deploy-web
if: ${{ needs.deploy-web.result == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- run: ./scripts/assert-no-cloud-credentials
- run: ./scripts/smoke-web --environment production
main must remain allowed, prefer branch protection with only required_conversation_resolution enabled. Use organization or repository rulesets for conversation resolution only when making default-branch changes go through pull requests is intended. Preserve existing approvals, status checks, signed-commit, and actor restrictions when changing branch policy.staging and production stages/projects/state so one deploy path cannot delete or mutate the other environment's resources.(environment, lane) and shared between main.yml and deploy.yml.development
Ban direct `useEffect` in React code. Use when writing, refactoring, reviewing, or migrating React components or hooks that import, call, add, or replace direct `useEffect`; when an agent reaches for effects for derived state, fetching, event reactions, resets, or external sync; or when adding lint/agent rules for a no-direct-useEffect policy. Do not use for ordinary React work with no effect smell, non-React code, or legitimate effect architecture outside React.
development
Independently audit existing code, diffs, branches, or pull requests by spawning mandatory concern-specific reviewer subagents, then synthesizing their evidence into a ship decision. Use when triaging PR risk, deciding whether someone else's change is safe to ship, or following up after runtime proof. Produces a `ship it` / `needs review` / `blocked` verdict. Do not use to self-check a change you just authored.
testing
Set up or align a repository's GitHub collaboration and delivery surface: repo settings, branch/ruleset policy, PR and security templates, Actions hardening, GitHub Environments, release workflows, and deploy workflows. Use when standardizing GitHub setup for repos, CI/CD, publishing versioned packages, or deploying running apps; route app deploy details to deploy references and package publish details to release references.
tools
Run structured Codex/Claude autoreview closeout for uncommitted changes, branch/PR diffs, or single commits: choose the target, run the bundled review helper, validate findings, and rerun focused tests until clean. Use when asked for autoreview, Codex review, Claude review, automated PR review, second-model review, or merge-readiness review.