Manually-triggered production deploy with approval
Manually-triggered production deploy with approval
Manual approvals before a production deploy are a universal CI need. The four platforms use different mechanisms: environments + reviewers (GitHub), `when: manual` rules (GitLab), `type: approval` workflow nodes (CircleCI), and custom pipelines with `trigger: manual` (Bitbucket).
Conversion notes
- •On GitHub, configure the deployment environment's required reviewers in repository settings — the workflow YAML alone does not enforce gating.
Side-by-side implementation
name: deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- run: ./scripts/deploy.sh
deploy:
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
when: manual
script:
- ./scripts/deploy.sh
version: 2.1
jobs:
deploy:
docker: [{ image: cimg/base:stable }]
steps:
- checkout
- run: ./scripts/deploy.sh
workflows:
prod:
jobs:
- approve:
type: approval
filters: { branches: { only: [main] } }
- deploy:
requires: [approve]
filters: { branches: { only: [main] } }
image: ubuntu:22.04
pipelines:
custom:
deploy-prod:
- step:
name: deploy (manual)
trigger: manual
script:
- ./scripts/deploy.sh
Related Tools
YAML Formatter
Format and validate YAML. Convert YAML to JSON or JSON to YAML. Supports 2 and 4 space indentation.
Cron Builder
Visual builder for cron-job schedules.
Gitignore Generator
Generate .gitignore files for any language, framework, or IDE — 100+ templates, 100% client-side.
JSON Schema Generator
Generate a JSON Schema from one or more sample JSONs — drafts 2020-12, 2019-09, 7, 6, 4. Detects formats (date-time, email, uuid, ipv4, uri), extracts $defs, validates with AJV, and exports to YAML, TypeScript, and Zod. 100% in your browser.
AI Coding Rules
Curated rules-file library and generator for Cursor, Claude Code, GitHub Copilot, Windsurf, Cline, Aider, Continue, and Cody. Browse 20 hand-crafted .cursorrules / CLAUDE.md / copilot-instructions.md files for popular stacks, build a custom one with the wizard, or convert any rules file between AI-tool formats.