clickworx-org/org-workflows repository.
Workflow configuration
The main workflow is defined in.github/workflows/composite.yml:
Trigger branches
The workflow triggers on pushes to:- main/master - Production deployments
- develop - Development environment
- hotfix/* - Emergency production fixes
- feature/* - Feature branch builds
- bugfix/* - Bug fix builds
- sharpdev/* - Developer-specific branches
Build process
The composite workflow handles:- Code checkout - Retrieves source code from repository
- Dependency restoration - Restores NuGet packages
- Compilation - Builds .NET projects
- Unit tests - Runs test suite
- Artifact packaging - Creates deployment packages
- Deployment trigger - Initiates AWS CodeDeploy
AWS CodeDeploy integration
Application structure
The repository contains multipleappspec.yml files for different deployment scenarios:
Root appspec.yml
Deploys both API and Admin applications:Individual project appspec.yml
Each project has its own deployment configuration:Deployment hooks
BeforeInstall hook
Thebefore-install.ps1 script prepares the environment:
- Stops IIS application pools
- Stops Windows services
- Backs up current deployment
- Clears temporary files
AfterInstall hook
Theafter-install.ps1 script completes deployment:
- Starts IIS application pools
- Starts Windows services
- Verifies application health
- Configures logging (SumoLogic)
- Runs database migrations (if needed)
Environment-specific builds
Each environment uses specific build configurations:- Development
- Staging
- Alpha
- Production
- Branch:
develop - Configuration:
appsettings.Development.json - Database: Development SQL Server
- Identity Server: Development instance
Build artifacts
The build process creates deployment packages containing:- Compiled application binaries
- Configuration files
- Static assets (wwwroot)
- AWS CodeDeploy scripts
- Database migration scripts
Monitoring deployments
GitHub Actions
Monitor workflow execution in GitHub:- Navigate to repository Actions tab
- Select workflow run
- View job logs and status
- Check deployment artifacts
AWS CodeDeploy console
Track deployment progress in AWS:- Open AWS CodeDeploy console
- Select application
- View deployment status
- Check deployment logs
- Monitor instance health
Troubleshooting
Build failures
Common issues and solutions:NuGet restore fails
NuGet restore fails
- Verify package source configuration
- Check network connectivity
- Clear NuGet cache
- Verify authentication credentials
Compilation errors
Compilation errors
- Review build logs for specific errors
- Verify .NET SDK version
- Check for missing dependencies
- Ensure code compiles locally
Test failures
Test failures
- Review test output logs
- Check database connectivity
- Verify test data setup
- Run tests locally to reproduce
Deployment failures
CodeDeploy timeout
CodeDeploy timeout
- Check instance connectivity
- Verify CodeDeploy agent status
- Review deployment logs
- Increase timeout in appspec.yml
Hook script failures
Hook script failures
- Review PowerShell script logs
- Check file permissions
- Verify IIS configuration
- Test scripts manually on instance
Health check failures
Health check failures
- Verify application started successfully
- Check IIS application pool status
- Review application logs
- Test health endpoint manually
Best practices
Branch strategy
Follow GitFlow branching model for organized releases
Pull requests
Require PR reviews before merging to protected branches
Automated testing
Maintain comprehensive test coverage for CI validation
Deployment windows
Schedule production deployments during low-traffic periods
