A GitHub template for Agile teams, automating CI/CD pipelines and simplifying multi-environment deployments through PR-driven workflows.
Designed to integrate testing, environment-specific deployments, and team collaboration via Pull Request comments.

-
Environment-Specific CI/CD Pipelines
Isolated workflows for development, staging, and production. -
Automated Testing
Runs tests on each PR before offering deployment steps. -
Comment-Driven Workflow Triggers
Trigger CI/CD flows by commenting on the PR – no manual dispatches or UI clicks. -
Progressive Promotion Model
Code is promoted throughdevelopment → stage → main
via defined steps. -
Hotfix Automation
Automatically triggers production deployment and closes linked issues when hotfix branches (hotfix/issue-*
) are deleted, streamlining urgent fixes and cleanup.
Each stage of the pipeline is triggered by PR comments in the following sequence:
- Merges the feature branch into
development
- Builds and deploys to the development environment
- Workflow:
build-and-deploy-dev.yml
- Merges
development
intostage
- Builds the code for the staging environment
- Workflow:
build-stage.yml
- Deploys from
stage
to the staging environment - No merge occurs
- Workflow:
deploy-stage.yml
- Deploys the already-reviewed PR branch to production
- No merge occurs — assumes PR is targeting
main
- Workflow:
deploy-prod.yml
- On deletion of any
hotfix/issue-*
branch:- Automatically triggers production deployment (
deploy-prod.yml
) - Closes the corresponding GitHub issue linked to the hotfix branch
- Automatically triggers production deployment (
- Workflow:
.github/workflows/hotfix-deploy-on-delete.yml
(example filename)
⚠️ Always wait for each workflow to complete before triggering the next.
- Create a PR targeting
main
- CI runs tests and comments this guide
- You, the developer or reviewer, comment each step sequentially
- CI/CD workflows are triggered, and environments are progressively updated
- merge & build and deploy for development
- merge & build for staging
- deploy for staging
- deploy for production
Workflow Name | File Name | Trigger Source |
---|---|---|
Test & Comment Guide | .github/workflows/test.yml |
pull_request: opened |
PR Comment Handler | .github/workflows/handle-comment.yml |
issue_comment: created |
Dev CI/CD | .github/workflows/build-and-deploy-dev.yml |
PR Comment |
Staging Build | .github/workflows/build-stage.yml |
PR Comment |
Staging Deploy | .github/workflows/deploy-stage.yml |
PR Comment |
Production Deploy | .github/workflows/deploy-prod.yml |
PR Comment |
Hotfix Deploy & Issue Close | .github/workflows/hotfix-deploy-on-delete.yml |
delete event on hotfix/issue-* branches |
- Node.js 20+
- GitHub Actions enabled on your repository
- Protected branches:
main
,stage
,development
recommended
- Simplifies multi-env deployment
- Keeps CI/CD steps visible and auditable
- Enables non-admins to trigger deployments safely
- Aligns development flow with Agile iteration cycles
- Automates hotfix deployment and issue management for faster fixes
- Support for rollback triggers
- Slack/Discord notifications
- Built-in status tracking on PRs
MIT License