This document explains the Build & Deploy GRC DB GitHub Actions workflow.
It is written for anyone new to the project so they can understand what happens
when code is pushed or the workflow is triggered manually.
What is this workflow?
This workflow automatically builds the GRC database project and deploys it
to the production SQL Server whenever code is pushed to the main branch.
It also supports manual triggering with extra control options.
In simple terms — when a developer pushes a database schema change, this
workflow takes care of building, checking, backing up, and deploying it safely.
How it gets triggered
Trigger How
Automatic Any push to the main branch starts the workflow automatically
Manual You can also run it manually from the GitHub Actions tab using workflow_dispatch
Manual trigger options
When running manually, two extra options are available:
Option What it does Default
deploy Set to true to allow deployment to run true
force Set to true to deploy even if destructive changes are detected false
Workflow Overview
The workflow runs in 4 stages in order. Each stage must pass before the next one starts.
text
PUSH TO MAIN
│
▼
┌─────────────┐
│ 1. BUILD │ Compiles the SQL project into a .dacpac file
└──────┬──────┘
│
▼
┌──────────────────────────────┐
│ 2. GENERATE DEPLOYMENT │ Compares .dacpac with live DB
│ REPORT │ Shows what will be created,
│ │ altered, dropped, or rebuilt
└──────────────┬───────────────┘
│
▼┌─────────────────┐
│ 3. BACKUP │ Takes a full .bacpac backup of the
│ │ production database before any changes
└────────┬────────┘
│
▼
┌─────────────────┐
│ 4. DEPLOY │ Publishes the .dacpac to pro