Advanced DevOps Guide Zero Ops on Mac Mini M4: Native CI/CD for C# APIs Launchd Agents Automated Deploy Git-Driven Transforming your Mac Mini into a self-healing, auto-deploying production server. "The goal is simple: Git Push and forget. No manual terminals, no complex Docker layers—just pure macOS native resilience." 1 The Core: Deployment Script We create a dedicated deploy.sh script. This "heart" of the system handles compiling the ARM64 binary and restarting the service. Script Location: ~/code/csharp/be-real-doctor-api/deploy.sh #!/bin/bash # 1. Explicitly define PATH so Launchd can find git and dotnet export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet" PROJECT_DIR="/Users/ismael/code/csharp/repo-name" PUBLISH_DIR="$PROJECT_DIR/src/publish" ...