Skip to content

Add Azure App Service backend deployment workflow for demo environments - #12

Draft
johnstel with Copilot wants to merge 3 commits into
mainfrom
copilot/add-backend-deployment-workflow
Draft

Add Azure App Service backend deployment workflow for demo environments#12
johnstel with Copilot wants to merge 3 commits into
mainfrom
copilot/add-backend-deployment-workflow

Conversation

Copilot AI commented May 29, 2026

Copy link
Copy Markdown

Current CI/CD only deploys static landing assets, leaving no reproducible deployment path for the FastAPI backend used in demos. This PR adds a dedicated backend deployment workflow with main/manual triggers, App Service deployment, health-gated rollout, and operator documentation.

  • Workflow: backend build → publish → deploy

    • Added .github/workflows/deploy-backend-demo.yml.
    • Triggers on:
      • push to main
      • workflow_dispatch with operator inputs (environment, app_service_name, health_check_base_url, health_check_path).
    • Job structure:
      • build: Python setup + dependency install + compile validation.
      • publish: package backend artifact (backend-app.zip) and upload artifact.
      • deploy: OIDC Azure login + azure/webapps-deploy.
  • Deployment target + config resolution

    • Deploys to Azure App Service using resolved app name with explicit precedence:
      1. manual app_service_name input
      2. BACKEND_APP_SERVICE_NAME variable (environment/repo scope)
  • Post-deploy smoke check (fail-closed)

    • Performs HTTP health probe after deploy.
    • Normalizes health path input and validates:
      • transport success
      • HTTP 2xx status
      • valid JSON payload
      • healthy status contract (result.status or fallback overall)
    • Emits actionable failure diagnostics for operators.
  • Docs: required config + rollback runbook

    • Updated docs/README.md with:
      • required Azure OIDC configuration (AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_SUBSCRIPTION_ID, BACKEND_APP_SERVICE_NAME)
      • manual dispatch inputs
      • smoke-check behavior
      • rollback guidance via last known-good commit + same target environment.
- name: Smoke check backend health endpoint
  run: |
    NORMALIZED_HEALTH_PATH="${HEALTH_PATH#/}"
    HEALTH_URL="${BASE_URL%/}/${NORMALIZED_HEALTH_PATH}"
    HTTP_STATUS="$(curl --silent --show-error --location \
      --retry 5 --retry-delay 5 \
      --output /tmp/health-response.json \
      --write-out '%{http_code}' "$HEALTH_URL")"
    [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 300 ]

Copilot AI linked an issue May 29, 2026 that may be closed by this pull request
8 tasks
Copilot AI changed the title [WIP] Add backend deployment workflow for FastAPI app demo path Add Azure App Service backend deployment workflow for demo environments May 29, 2026
Copilot AI requested a review from johnstel May 29, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add backend deployment workflow for FastAPI app demo path

2 participants