Skip to content

Commit 662e68f

Browse files
committed
docs: mandate GitHub Workflows as the only deployment path
- Add deployment policy to azd-deployment.md runbook (mandatory directive) - Add deployment section to CONTRIBUTING.md - Add .github/copilot-instructions.md enforcing GitHub Workflow deployment
1 parent 992d99f commit 662e68f

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

.github/copilot-instructions.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copilot Instructions for Tutor Platform
2+
3+
## Deployment Policy (MANDATORY)
4+
5+
All deployments to Azure **MUST** be performed via GitHub Workflows. Never suggest or execute direct `azd deploy`, `az containerapp update`, or manual Docker pushes for production environments.
6+
7+
**Authorized deployment paths:**
8+
9+
- `.github/workflows/azd-deploy.yml` — Infrastructure + 8 backend services (triggers on push to `main` or `workflow_dispatch`)
10+
- `.github/workflows/azure-static-web-apps-polite-wave-029b18f0f.yml` — Frontend SWA (triggers on push to `main`, PR events, or `workflow_dispatch`)
11+
12+
When a user asks to deploy, always guide them to merge into `main` (which auto-triggers workflows) or to use `workflow_dispatch` from the GitHub Actions UI.
13+
14+
Local `azd provision` and `azd deploy` are permitted **only** for first-time environment bootstrap per the [deployment runbook](docs/runbooks/azd-deployment.md).

CONTRIBUTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,14 @@ Before you submit your Pull Request (PR) consider the following guidelines:
7474
```
7575

7676
That's it! Thank you for your contribution!
77+
78+
## <a name="deployment"></a> Deployment Policy
79+
80+
**All deployments to Azure MUST use GitHub Workflows.** Manual `azd deploy`, `az containerapp update`, or direct Docker pushes are not permitted for production environments.
81+
82+
| Workflow | Scope |
83+
|----------|-------|
84+
| `.github/workflows/azd-deploy.yml` | Infrastructure provisioning + backend services (Container Apps) |
85+
| `.github/workflows/azure-static-web-apps-polite-wave-029b18f0f.yml` | Frontend (Static Web App) |
86+
87+
Both workflows trigger automatically on push to `main`. They can also be run manually via `workflow_dispatch`. See the [deployment runbook](docs/runbooks/azd-deployment.md) for full details.

docs/runbooks/azd-deployment.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
This runbook describes how to provision and deploy Tutor with Azure Developer CLI (`azd`) and Terraform.
44

5+
> **DEPLOYMENT POLICY — MANDATORY**
6+
>
7+
> All deployments to Azure **MUST** be performed via GitHub Workflows. Direct `azd deploy`, `az containerapp update`, or manual Docker pushes to ACR are **prohibited** for production environments. The only authorized deployment paths are:
8+
>
9+
> | Workflow | Scope | Trigger |
10+
> |----------|-------|---------|
11+
> | `.github/workflows/azd-deploy.yml` | Infrastructure + 8 backend services (Container Apps) | Push to `main` or `workflow_dispatch` |
12+
> | `.github/workflows/azure-static-web-apps-polite-wave-029b18f0f.yml` | Frontend (Static Web App) | Push to `main`, PR events, or `workflow_dispatch` |
13+
>
14+
> **Why:** GitHub Workflows provide auditable, reproducible deployments with proper secret management via OIDC federation. Manual deployments bypass CI checks, status gates, and deployment traceability.
15+
>
16+
> Local `azd provision` and `azd deploy` are permitted **only** for first-time bootstrap of a new environment (see [First-Time Bootstrap](#first-time-bootstrap-local)).
17+
518
## Scope
619

720
- Repository: `Azure-Samples/tutor`

0 commit comments

Comments
 (0)