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
GitHub Actions
name: deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- run: ./scripts/deploy.sh
GitLab CI
deploy:
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
when: manual
script:
- ./scripts/deploy.sh
CircleCI
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] } }
Bitbucket Pipelines
image: ubuntu:22.04
pipelines:
custom:
deploy-prod:
- step:
name: deploy (manual)
trigger: manual
script:
- ./scripts/deploy.sh
Related Tools
More Developer Tools- YAML FormatterFormat and validate YAML. Convert YAML to JSON or JSON to YAML. Supports 2 and 4 space indentation.Free • In browser
- Cron BuilderVisual builder for cron-job schedules.Free • In browser
- Gitignore GeneratorGenerate .gitignore files for any language, framework, or IDE — 100+ templates, 100% client-side.Free • In browser
Also useful: JSON Schema GeneratorAI Coding Rules