google-agents-cli-scaffold
Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
Deploy Azure infrastructure, BFF API, Static Web Apps, and configure App Service settings
Full skill instructions
Category: Operations Last Updated: January 2026
| Deployment Type | Tool | Skill/Guide |
|---|---|---|
| Azure Infrastructure | Azure CLI + Bicep | This skill |
| BFF API | Azure CLI / GitHub Actions | This skill |
| Office Add-ins / SWA | SWA CLI + PowerShell | This skill |
| Dataverse/PCF | PAC CLI | Use dataverse-deploy skill |
| Solution Import | PAC CLI | Use dataverse-deploy skill |
For Dataverse deployments (PCF, solutions, web resources): Use the dataverse-deploy skill instead.
# Verify installations
az --version # Azure CLI 2.50+
az bicep version # Bicep CLI 0.39+
dotnet --version # .NET SDK 8.0+
| Resource | Access Level |
|---|---|
| Azure Subscription | Contributor role |
| Azure AD | Application Administrator (for app registrations) |
# Login to Azure
az login
# Set subscription
az account set --subscription "Spaarke SPE Subscription 1"
# Verify
az account show --query "{Name:name, Id:id}" -o table
| Environment | Subscription | Resource Group |
|---|---|---|
| Dev | Spaarke SPE Subscription 1 | spe-infrastructure-westus2 |
| Prod | (TBD) | rg-spaarke-{customer}-prod |
| Service | Endpoint |
|---|---|
| BFF API | https://spe-api-dev-67e2xz.azurewebsites.net |
| Azure OpenAI | https://spaarke-openai-dev.openai.azure.com/ |
| AI Search | https://spaarke-search-dev.search.windows.net/ |
| Document Intelligence | https://westus2.api.cognitive.microsoft.com/ |
| Key Vault | https://sprkspaarkedev-aif-kv.vault.azure.net/ |
| AI Foundry Hub | sprkspaarkedev-aif-hub |
| AI Foundry Project | sprkspaarkedev-aif-proj |
| Secret Name | Purpose |
|---|---|
openai-api-key | Azure OpenAI API key |
search-admin-key | AI Search admin key |
docintel-api-key | Document Intelligence key |
redis-connection | Redis connection string |
appinsights-key | Application Insights key |
Full environment reference: See docs/guides/AZURE-DEPLOYMENT-GUIDE.md → Environment Configuration
| Stack | Path | Purpose |
|---|---|---|
| AI Foundry | infrastructure/bicep/stacks/ai-foundry-stack.bicep | AI Hub, Project, Storage, KV |
| Model 1 Shared | infrastructure/bicep/stacks/model1-shared.bicep | Shared infrastructure |
| Model 2 Full | infrastructure/bicep/stacks/model2-full.bicep | Full customer deployment |
# Navigate to infrastructure directory
cd infrastructure/bicep
# Deploy AI Foundry stack
az deployment group create `
--resource-group spe-infrastructure-westus2 `
--template-file stacks/ai-foundry-stack.bicep `
--parameters customerId=spaarke environment=dev location=westus2
# List deployed resources
az resource list `
--resource-group spe-infrastructure-westus2 `
--output table
| Resource Type | Name Pattern | Purpose |
|---|---|---|
| Storage Account | sprk{customer}{env}aifsa | AI Foundry storage |
| Key Vault | sprk{customer}{env}-aif-kv | Secrets |
| Log Analytics | sprk{customer}{env}-aif-logs | Monitoring |
| App Insights | sprk{customer}{env}-aif-insights | APM |
| ML Workspace (Hub) | sprk{customer}{env}-aif-hub | AI Foundry Hub |
| ML Workspace (Project) | sprk{customer}{env}-aif-proj | AI Foundry Project |
# Build release
cd src/server/api/Sprk.Bff.Api
dotnet publish -c Release -o ./publish
# Or use publish profile
dotnet publish -c Release /p:PublishProfile=Azure
Use the deployment script - handles build, package, deploy, and verification:
# Full build and deploy (~1 min)
.\scripts\Deploy-BffApi.ps1
# Deploy existing build (faster, ~30 sec)
.\scripts\Deploy-BffApi.ps1 -SkipBuild
What the script does:
-SkipBuild)If you need to run steps manually:
# Build and package
cd src/server/api/Sprk.Bff.Api
dotnet publish -c Release -o ./publish
Compress-Archive -Path './publish/*' -DestinationPath './publish.zip' -Force
# Deploy
az webapp deploy `
--resource-group spe-infrastructure-westus2 `
--name spe-api-dev-67e2xz `
--src-path ./publish.zip `
--type zip
# Verify deployment took effect
curl https://spe-api-dev-67e2xz.azurewebsites.net/healthz
Use for production deployments - push to master triggers automated deployment:
# Merge to master triggers deploy-staging.yml
git push origin master
# Monitor deployment
gh run list --workflow=deploy-staging.yml --limit 3
gh run watch
See .github/workflows/deploy-staging.yml for configuration.
Use when CLI deploy reports success but app still runs old code:
spe-api-dev-67e2xzpublish.zip onto the pageNote: This is a rare fallback. If CLI deploys consistently fail to update the app, check Deployment Center logs first.
# Set individual setting
az webapp config appsettings set `
--resource-group spe-infrastructure-westus2 `
--name spe-api-dev-67e2xz `
--settings Ai__Enabled=true
# Set multiple settings from file
az webapp config appsettings set `
--resource-group spe-infrastructure-westus2 `
--name spe-api-dev-67e2xz `
--settings @appsettings.json
| Setting | Example Value |
|---|---|
Ai__Enabled | true |
Ai__OpenAiEndpoint | https://spaarke-openai-dev.openai.azure.com/ |
Ai__OpenAiKey | @Microsoft.KeyVault(...) |
Ai__SummarizeModel | gpt-4o-mini |
DocumentIntelligence__Enabled | true |
DocumentIntelligence__AiSearchEndpoint | https://spaarke-search-dev.search.windows.net |
Full settings reference: See docs/guides/AZURE-DEPLOYMENT-GUIDE.md → BFF API App Settings
| Resource | Value |
|---|---|
| Static Web App Name | spaarke-office-addins |
| Resource Group | spe-infrastructure-westus2 |
| URL | https://icy-desert-0bfdbb61e.6.azurestaticapps.net |
| Source Directory | src/client/office-addins |
| Dist Directory | src/client/office-addins/dist |
Use the deployment script - handles all the complexity:
# Full build and deploy
.\scripts\Deploy-OfficeAddins.ps1
# Skip build (use existing dist)
.\scripts\Deploy-OfficeAddins.ps1 -SkipBuild
# Deploy to preview environment
.\scripts\Deploy-OfficeAddins.ps1 -Environment preview
# Verbose output
.\scripts\Deploy-OfficeAddins.ps1 -Verbose
What the script does:
-SkipBuild)If you need to run steps manually:
# Navigate to office-addins directory
cd src/client/office-addins
# 1. Build production bundle
npx webpack --mode production
# 2. Get fresh deployment token (tokens can expire/rotate)
$token = az staticwebapp secrets list `
--name spaarke-office-addins `
--resource-group spe-infrastructure-westus2 `
--query properties.apiKey -o tsv
# 3. Deploy with output to log file (avoids spinner hanging issue)
Start-Process -FilePath 'powershell.exe' `
-ArgumentList "-NoProfile","-Command","npx swa deploy ./dist --deployment-token $token --env production *> deploy.log" `
-NoNewWindow -Wait
# 4. Check deployment result
Get-Content deploy.log
# 5. Verify deployment (use cache-busting param)
curl "https://icy-desert-0bfdbb61e.6.azurestaticapps.net/outlook/manifest.xml?v=$(Get-Date -Format 'HHmmss')"
| Aspect | Direct Deploy | GitHub Actions |
|---|---|---|
| Speed | ~30 seconds | 2-5 minutes (CI + deploy) |
| Requires PR | No | Yes (merge to master) |
| Best for | Dev iteration, debugging | Production releases |
| Token | Fresh each time | Stored in secrets |
Use Direct Deploy when:
Use GitHub Actions when:
| Issue | Cause | Solution |
|---|---|---|
| Spinner hangs forever | SWA CLI spinner blocks output | Use Start-Process with log redirect |
| Old token rejected | Tokens rotate periodically | Get fresh token via az staticwebapp secrets list |
| Deployment succeeds but old content | CDN caching | Add ?v=timestamp to verify, wait 1-2 min |
| 404 on deployed files | Wrong dist path | Verify ./dist contains expected files |
After deploying code changes, if manifest changed:
https://icy-desert-0bfdbb61e.6.azurestaticapps.net/outlook/manifest.xmlNote: Manifest version must be incremented (e.g., 1.0.1.0 → 1.0.2.0) for M365 to accept updates.
# Store OpenAI API key
az keyvault secret set `
--vault-name sprkspaarkedev-aif-kv `
--name openai-api-key `
--value "YOUR-API-KEY"
# Store from Azure resource (auto-retrieve)
az keyvault secret set `
--vault-name sprkspaarkedev-aif-kv `
--name openai-api-key `
--value "$(az cognitiveservices account keys list --name spaarke-openai-dev --resource-group spe-infrastructure-westus2 --query key1 -o tsv)"
# Get secret value
az keyvault secret show `
--vault-name sprkspaarkedev-aif-kv `
--name openai-api-key `
--query value -o tsv
# Check API is running
curl https://spe-api-dev-67e2xz.azurewebsites.net/healthz
# Expected: "Healthy"
curl https://spe-api-dev-67e2xz.azurewebsites.net/ping
# Expected: "pong"
# List resources in resource group
az resource list --resource-group spe-infrastructure-westus2 -o table
# Check specific resource
az webapp show --name spe-api-dev-67e2xz --resource-group spe-infrastructure-westus2 --query state
# Check OpenAI deployments
az cognitiveservices account deployment list `
--name spaarke-openai-dev `
--resource-group spe-infrastructure-westus2 `
-o table
# Check AI Search index
az search index list `
--service-name spaarke-search-dev `
--resource-group spe-infrastructure-westus2 `
-o table
| Error | Cause | Solution |
|---|---|---|
AuthorizationFailed | Insufficient permissions | Verify Contributor role on subscription |
ResourceNotFound | Wrong resource group or name | Check resource names in Environment Reference |
DeploymentFailed | Bicep template error | Check az deployment group show --name {deployment} for details |
KeyVault access denied | Missing Key Vault policy | Add access policy for your identity |
App Service 503 | API not started | Check Application Insights logs |
App Service 500 after deploy | DI scope mismatch or startup error | Check /healthz response body for error details |
| CLI deploy succeeds but old code runs | Deployment didn't register | Check Deployment Center logs; use Kudu as fallback |
Symptom: az webapp deploy reports success, but the API still runs old code.
Diagnosis:
Solution (in order of preference):
az webapp deployment source config-zipcurl https://{app}.azurewebsites.net/healthzRoot Cause: This is rare and may indicate Azure-side caching or deployment slot issues. For consistent deployments, use GitHub Actions (Option A).
# API logs (streaming)
az webapp log tail --name spe-api-dev-67e2xz --resource-group spe-infrastructure-westus2
# Deployment logs
az webapp log deployment show --name spe-api-dev-67e2xz --resource-group spe-infrastructure-westus2
| Resource Type | Pattern | Example |
|---|---|---|
| Resource Group | rg-spaarke-{customer}-{env} | rg-spaarke-contoso-prod |
| App Service | sprk-{app}-{env} | sprk-bff-dev |
| Key Vault | sprk{customer}{env}-{purpose}-kv | sprkspaarkedev-aif-kv |
| Storage Account | sprk{customer}{env}sa | sprkspaarkedevsa |
| Azure OpenAI | spaarke-openai-{env} | spaarke-openai-dev |
| AI Search | spaarke-search-{env} | spaarke-search-dev |
Full naming conventions: See docs/architecture/AZURE-RESOURCE-NAMING-CONVENTION.md
| Skill | Use For |
|---|---|
dataverse-deploy | Dataverse solutions, PCF controls, web resources |
ribbon-edit | Ribbon customizations (uses solution export/import) |
ci-cd | CI/CD pipeline status and automated deployment workflows |
This skill documents manual Azure deployments. For automated deployments, see the GitHub Actions workflows:
| Workflow | Trigger | What It Deploys |
|---|---|---|
deploy-staging.yml | Auto (after CI passes on master) | API to staging App Service |
deploy-to-azure.yml | Manual trigger | Infrastructure (Bicep) + API to production |
| Scenario | Use |
|---|---|
| Regular code deployments | Automated (deploy-staging.yml after merge to master) |
| Production deployment | Automated (deploy-to-azure.yml manual trigger) |
| Emergency hotfix | Manual deployment (this skill) |
| Infrastructure changes only | Manual deployment (this skill) |
| Debugging deployment issues | Manual deployment (this skill) |
# Trigger production deployment manually
gh workflow run deploy-to-azure.yml
# Monitor deployment progress
gh run watch
# View deployment status
gh run list --workflow=deploy-to-azure.yml --limit 5
# View recent deployments
gh run list --workflow=deploy-to-azure.yml
# View specific run details
gh run view {run-id}
# Download deployment artifacts
gh run download {run-id}
| Document | Purpose |
|---|---|
docs/guides/AZURE-DEPLOYMENT-GUIDE.md | Comprehensive deployment reference |
docs/guides/CUSTOMER-DEPLOYMENT-GUIDE.md | Customer-facing setup guide |
docs/architecture/AZURE-RESOURCE-NAMING-CONVENTION.md | Naming standards |
dataverse-deploy skill instead of this one/healthz endpoint@Microsoft.KeyVault(SecretUri=...) syntax in App Settings/healthz and Deployment Center logs| Component | Script | Usage |
|---|---|---|
| BFF API | .\scripts\Deploy-BffApi.ps1 | Full build+deploy in ~1 min |
| Office Add-ins | .\scripts\Deploy-OfficeAddins.ps1 | Full build+deploy in ~30 sec |
Both scripts support -SkipBuild flag to deploy existing builds faster.
/healthz response body for DI scope or startup errors.\scripts\Deploy-OfficeAddins.ps1 for SWA deploymentsnpx swa deploy directly from bash?v=timestamp parameter to verify new contentProject scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.
Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.
Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.
Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.
Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.
Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.
Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.
Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".
Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.
Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.
Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".
Opus.ai: Revolutionize Your Web Experience
Build a no-code AI app in minutes.
An IDE for code migration from legacy to modern frameworks through coding agents.
Automate CGI animation in live-action scenes
Branded artistic QR-code concepts
Launch a website in seconds with AI.
Streamline Your Coding Experience with AI Code Helper
Convert any screenshot or design to clean code.