DeployForge
CI/CD pipeline from scratch — GitHub Actions, Docker, Azure Container Apps
About This Project
Build a complete CI/CD pipeline for a .NET API: automated tests, Docker image build and push, container security scanning, staging deployment on pull request, and production deployment on merge to main. Includes environment promotion, rollback strategy, and structured deployment notifications.
What You'll Learn
Key Features
Project Structure
DeployForge/ ├── src/ │ └── DeployForge.Api/ # Sample .NET 9 API (the deploy target) ├── tests/ │ └── DeployForge.Tests/ # Unit + integration tests (CI gate) ├── .github/ │ └── workflows/ │ ├── ci.yml # Test + security scan on every push │ └── cd.yml # Deploy on merge to main ├── infra/ │ ├── main.bicep # Container Apps + ACR + Log Analytics │ └── container-app.bicep # Container App definition ├── Dockerfile # Multi-stage build └── docker-compose.yml # Local development
Setup Guide
Fork the repository
Fork DeployForge — the workflows run in your own GitHub Actions.
# Fork via GitHub UI, then clone your fork git clone https://github.com/<your-username>/DeployForge.git cd DeployForge
Provision Azure resources with Bicep
Create the Container Registry, Container Apps environment, and Log Analytics workspace.
az login az group create --name deployforge-rg --location uksouth az deployment group create \ --resource-group deployforge-rg \ --template-file infra/main.bicep
Add GitHub Actions secrets
Store Azure credentials and registry details as repository secrets.
# In GitHub repo Settings → Secrets: # AZURE_CREDENTIALS (output of: az ad sp create-for-rbac) # ACR_NAME (your Azure Container Registry name) # AZURE_RG (deployforge-rg) # SLACK_WEBHOOK_URL (optional — Slack incoming webhook)
Running the Project
Trigger the CI pipeline
Push a commit — GitHub Actions runs tests and security scan automatically.
git checkout -b feature/test-pipeline git commit --allow-empty -m "trigger: test CI pipeline" git push origin feature/test-pipeline # Open a PR — staging deploy kicks off automatically
Merge to deploy to production
Merging to main triggers the CD workflow — rolling update with health check.
# Merge PR via GitHub UI # CD workflow runs: build → scan → push → deploy # Check deployment az containerapp revision list \ --name deployforge-api \ --resource-group deployforge-rg
Project Info
Tech Stack
Prerequisites
- GitHub account with Actions access
- Azure subscription (free tier works)
- Docker Desktop installed
- .NET 9 SDK installed
Learnixo
Project Author
Most DevOps tutorials show you how to deploy once. This shows you the full loop: PR → staging → review → production → rollback — with security scanning, IaC, and monitoring baked in from the start.