Full instructions: configure required secrets in the repository before enabling CI/CD. Go to
Settings → Secrets and variables → Actions and add each secret value. Do not commit secrets
to source control. For deploys that use the Azure CLI or Azure/login action, you can provide either
individual values (AZURE_SUBSCRIPTION_ID, AZURE_CLIENT_ID,
AZURE_TENANT_ID, AZURE_CLIENT_SECRET) or a single AZURE_CREDENTIALS
JSON used by azure/login (format shown below).
After adding secrets, validate by pushing to your deployment branch and checking the Actions run logs. If a
workflow fails due to missing or invalid secrets, the logs will indicate which step failed.
Required secrets (examples)
- FRONTEND_VITE_API_BASE_URL — frontend build: API base URL used at build time
- FRONTEND_VITE_CHATBOT_API_BASE_URL — frontend build: chatbot API URL
- VITE_MAPBOX_TOKEN — Mapbox token for map tiles
- AZURE_STATIC_WEB_APPS_API_TOKEN — optional token for Static Web Apps deploy
- AZURE_WEBAPP_PUBLISH_PROFILE — App Service publish profile XML (paste contents)
- AZURE_SUBSCRIPTION_ID, AZURE_CLIENT_ID,
AZURE_TENANT_ID, AZURE_CLIENT_SECRET — service principal credentials (or
provide AZURE_CREDENTIALS JSON below)
Using AZURE_CREDENTIALS (recommended for CI)
Create a single JSON with the required fields and store it as a GitHub secret named
AZURE_CREDENTIALS:
{"clientId":"","clientSecret":"","subscriptionId":"","tenantId":""}
Sample workflow snippets
Static Web Apps action (frontend):
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: 'upload'
App Service deploy (backend) via publish profile:
uses: azure/webapps-deploy@v2
with:
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: '.'