Files
miracles_in_motion/docs/deployment/DEPLOYMENT_INSTRUCTIONS.md
defiQUG e45573e885
Some checks failed
Build and Deploy / test (push) Has been cancelled
Build and Deploy / build (push) Has been cancelled
Build and Deploy / deploy (push) Has been cancelled
Deploy application code to production
- Build frontend application (dist/ ready)
- Build Function App API (TypeScript compiled)
- Fix staticwebapp.config.json (node:20 instead of node:22)
- Add deployment documentation and instructions

Ready for automatic deployment via GitHub Actions
2025-11-12 09:49:21 -08:00

2.6 KiB

🚀 Application Deployment Instructions

Date: November 12, 2025
Status: Deployment in progress


Current Status

Completed

  • Frontend built successfully (dist/ directory ready)
  • Function App API built successfully
  • Configuration fixed (node:20 instead of node:22)

⚠️ Pending

  • Static Web App deployment (SWA CLI having config issues)
  • Function App deployment (needs zip package)

The most reliable way to deploy is via GitHub Actions. If you have a workflow configured:

# Commit and push to trigger deployment
git add .
git commit -m "Deploy application to production"
git push origin main

This will automatically:

  • Build frontend
  • Build API
  • Deploy to Static Web App
  • Deploy Function App functions
  • Run tests

Alternative: Azure Portal Deployment

Static Web App

  1. Go to: https://portal.azure.com
  2. Navigate to: Static Web Appmim-prod-igiay4-web
  3. Go to: Deployment Center
  4. Choose: Upload or Connect to GitHub
  5. Upload the dist/ folder contents or connect your repository

Function App

  1. Go to: https://portal.azure.com
  2. Navigate to: Function Appmim-prod-igiay4-func
  3. Go to: Deployment Center
  4. Choose: Upload or Connect to GitHub
  5. Upload the built API code from api/src/

Manual Deployment Commands

Static Web App (if SWA CLI works)

# Get deployment token
DEPLOY_TOKEN=$(az staticwebapp secrets list \
  --name mim-prod-igiay4-web \
  --resource-group rg-miraclesinmotion-prod \
  --query "properties.apiKey" -o tsv)

# Deploy
npx @azure/static-web-apps-cli deploy ./dist \
  --env production \
  --deployment-token "$DEPLOY_TOKEN"

Function App (if func CLI available)

cd api
func azure functionapp publish mim-prod-igiay4-func

Configuration Issues Fixed

staticwebapp.config.json

  • Changed apiRuntime from node:22 to node:20
  • This is required as Azure Static Web Apps doesn't support Node.js 22 yet

Verification

After deployment, verify:

# Check Static Web App
curl -I https://lemon-water-015cb3010.3.azurestaticapps.net

# Check Function App
curl -I https://mim-prod-igiay4-func.azurewebsites.net

The Static Web App should show your React application, not the Azure default page.


Next Steps

  1. Recommended: Push to GitHub to trigger automatic deployment
  2. Alternative: Use Azure Portal to upload files manually
  3. Verify: Test endpoints after deployment

For issues, see: docs/deployment/DEPLOYMENT_ATTEMPT_LOG.md