Skip to content

Deployment

Architecture

The application is deployed as an Azure Static Web App, which hosts both:

  • The React frontend (static files)
  • The Azure Functions API (serverless backend)

GitHub Actions CI/CD

Deployment is automated via GitHub Actions. On push to main:

  1. GitHub Actions workflow triggers
  2. Builds the frontend (npm run build in /frontend)
  3. Builds the API (npm run build in /api)
  4. Deploys to Azure Static Web Apps

The workflow file is located at .github/workflows/azure-static-web-apps-*.yml.

Environment Configuration

Azure Static Web App Settings

Configure in Azure Portal → Static Web App → Configuration:

Setting Description
DATABASE_HOST Azure SQL server hostname
DATABASE_NAME Database name
DATABASE_USER SQL authentication username
DATABASE_PASSWORD SQL authentication password

Database

  • Azure SQL Database (Standard tier)
  • Connection via mssql npm package with connection pooling
  • Nightly sync from Cin7 via Apache Airflow

Manual Deployment

If needed, deploy manually using the Azure SWA CLI:

# Install SWA CLI
npm install -g @azure/static-web-apps-cli

# Build both projects
cd frontend && npm run build && cd ..
cd api && npm run build && cd ..

# Deploy
swa deploy --app-location frontend/dist --api-location api

Documentation Deployment

The docs site deploys separately to GitHub Pages:

pip install mkdocs-material
mkdocs gh-deploy

This publishes to https://brianc-lgtm.github.io/po-app/.