Skip to content

Full Workflow with Manual Approval for Deploy #17

Full Workflow with Manual Approval for Deploy

Full Workflow with Manual Approval for Deploy #17

Workflow file for this run

name: Manual Approval Deployment
# Manually triggered after CI Pipeline completes
on:
workflow_dispatch: # Allows for a manual trigger
# Optionally, you could set this to run automatically after a successful run of ci.yaml
# workflow_run:
# workflows: ["CI Pipeline"]
# types:
# - completed
jobs:
approval:
runs-on: ubuntu-latest
steps:
- name: Approval Step
run: echo "Manual approval required before deployment."
- name: Wait for approval
uses: actions/github-script@v6
with:
script: |
// Simulate a pause until a user approves in the GitHub interface or by running a command.
deploy:
runs-on: ubuntu-latest
needs: approval
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Deploy to production
run: echo "Deploying to production..."