-
Notifications
You must be signed in to change notification settings - Fork 23
Deployment Guide
This guide covers the -Deployment-Guide process for the Scrum Guide Expansion Pack using Azure Static Web Apps and GitHub Actions.
- Production: scrumexpansion.org - Live production site
- Preview: agreeable-island-0c966e810-preview.centralus.6.azurestaticapps.net - Test environment for pre-production changes
The project uses Azure Static Web Apps for hosting with automated -Deployment-Guides triggered by GitHub Actions. The -Deployment-Guide pipeline supports multiple environments for different stages of -Development-Guide.
- URL: scrumexpansion.org - Live production site
-
Branch:
main
-
-Configuration-Reference:
staticwebapp.config.production.json
-
Hugo Config:
hugo.yaml
- URL: agreeable-island-0c966e810-preview.centralus.6.azurestaticapps.net - Test environment for pre-production changes
-
Branch:
preview
-
-Configuration-Reference:
staticwebapp.config.preview.json
-
Hugo Config:
hugo.preview.yaml
- URL: https://agreeable-island-0c966e810-{PullRequestId}.centralus.6.azurestaticapps.net
-
Branch:
canary
-
-Configuration-Reference:
staticwebapp.config.canary.json
-
Hugo Config:
hugo.canary.yaml
-
Production: Uses custom domain
https://scrumexpansion.org
-
Preview: Azure Static Web Apps URL
https://agreeable-island-0c966e810-preview.centralus.6.azurestaticapps.net
-
Pull Request Environments: Dynamic URLs
https://agreeable-island-0c966e810-{PullRequestId}.centralus.6.azurestaticapps.net
Note: The baseURL in Hugo -Configuration-Reference files is typically set dynamically during the build process. Azure Static Web Apps automatically provides the correct URLs for each environment.
- agreeable-island-0c966e810: Azure-generated unique identifier for this Static Web App
- preview: Dedicated preview environment for testing pre-production changes
-
{PullRequestId}: Replaced with actual PR number (e.g.,
agreeable-island-0c966e810-42.centralus.6.azurestaticapps.net
for PR #42) - centralus.6.azurestaticapps.net: Azure region and domain suffix
Each environment has its own -Configuration-Reference file:
{
"routes": [
{
"route": "/",
"serve": "/index.html",
"statusCode": 200
},
{
"route": "/en/*",
"serve": "/en/index.html",
"statusCode": 200
},
{
"route": "/de/*",
"serve": "/de/index.html",
"statusCode": 200
},
{
"route": "/es/*",
"serve": "/es/index.html",
"statusCode": 200
},
{
"route": "/fr/*",
"serve": "/fr/index.html",
"statusCode": 200
}
],
"responseOverrides": {
"404": {
"serve": "/404.html",
"statusCode": 404
}
},
"mimeTypes": {
".pdf": "application/pdf"
},
"globalHeaders": {
"Cache-Control": "public, max-age=31536000, immutable"
},
"navigationFallback": {
"rewrite": "/index.html"
}
}
- Multi-language routing for i18n support
- Custom 404 handling
- PDF mime type -Configuration-Reference
- Caching headers for performance
- SPA fallback routing
The -Deployment-Guide is triggered automatically when:
- Pull requests are created (creates staging -Deployment-Guides with unique URLs)
- Manual workflow dispatch is triggered
- Push to main deploys to production
- Automatic PR Environments: Each pull request gets a unique URL
- Preview Environment: Dedicated preview environment for testing
- Production -Deployment-Guide: Custom domain -Deployment-Guide
- Automatic SSL: Managed SSL certificates
- Global CDN: Worldwide content distribution
The actual GitHub Actions workflow is configured for Azure Static Web Apps:
name: Azure Static Web Apps CI/CD
on: workflow_dispatch
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v3
with:
submodules: true
lfs: false
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_AGREEABLE_ISLAND_0C966E810 }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "./site"
api_location: ""
output_location: "."
baseURL: "https://scrumexpansion.org"
languageCode: "en-us"
title: "Scrum Guide Expansion Pack"
theme: ""
# Production-specific settings
minify: true
enableGitInfo: true
enableRobotsTXT: true
# Google Analytics
googleAnalytics: "G-XXXXXXXXXX"
# Security headers
security:
enableInlineShortcodes: false
exec:
allow: ["^dart-sass-embedded$", "^go$", "^npx$", "^postcss$"]
baseURL: "https://agreeable-island-0c966e810-preview.centralus.6.azurestaticapps.net"
languageCode: "en-us"
title: "Scrum Guide Expansion Pack - Preview"
# Preview-specific settings
buildDrafts: true
buildFuture: true
enableRobotsTXT: false
# Disable analytics in preview
googleAnalytics: ""
baseURL: "https://agreeable-island-0c966e810-{PullRequestId}.centralus.6.azurestaticapps.net"
languageCode: "en-us"
title: "Scrum Guide Expansion Pack - Canary"
# Canary-specific settings
buildDrafts: true
buildFuture: true
enableRobotsTXT: false
# Different analytics for canary
googleAnalytics: "G-CANARY-ID"
- Azure CLI installed and configured
- Static Web Apps CLI installed
- -Deployment-Guide tokens configured
# Build for production
cd site
hugo --environment production --minify
# Deploy using Azure CLI
cd ../public
swa deploy --env production
# Trigger workflow manually
gh workflow run deploy.yml --ref main
# Check workflow status
gh run list --workflow=deploy.yml
- Configure DNS to point to Azure Static Web Apps
- Add custom domain in Azure portal
- SSL certificate is automatically managed by Azure
# Production custom domain
CNAME scrumexpansion.org -> <static-web-app-url>
# -Development-Guide environments use Azure Static Web Apps URLs:
# Preview: https://agreeable-island-0c966e810-preview.centralus.6.azurestaticapps.net
# PR environments: https://agreeable-island-0c966e810-{PullRequestId}.centralus.6.azurestaticapps.net
- Minification of HTML, CSS, and JS
- Image optimization with Hugo's image processing
- Asset bundling and compression
- Tree shaking for unused CSS
- CDN distribution through Azure
- Caching headers for static assets
- Gzip compression enabled
- HTTP/2 support
- Azure Application Insights for performance monitoring
- Google Analytics for user behavior tracking
- GitHub Actions logs for -Deployment-Guide monitoring
- Build times and success rates
- Page load performance
- User engagement metrics
- Error rates and 404s
Configure alerts for:
- Failed -Deployment-Guides
- High error rates
- Performance degradation
- SSL certificate expiration
# Check Hugo version locally
hugo version
# Test build locally
cd site
hugo --environment production --minify --verbose
# Check for template errors
hugo --templateMetrics
- Check Azure Static Web Apps logs
- Verify GitHub Actions workflow
- Check -Configuration-Reference files
- Validate Hugo build output
- Verify DNS -Configuration-Reference
- Check Azure domain settings
- Wait for DNS propagation (up to 48 hours)
- Force SSL renewal if needed
- Check workflow logs in GitHub Actions
- Test build locally with same -Configuration-Reference
- Verify all secrets are configured correctly
- Check Azure resource status and logs
- Repository permissions managed through GitHub
- Azure resource access controlled via RBAC
- -Deployment-Guide tokens secured as GitHub secrets
- Branch protection rules enforced
- Static files only - no server-side vulnerabilities
- HTTPS enforcement for all traffic
- Content Security Policy headers
- Regular dependency updates
# Add GitHub secret for Azure -Deployment-Guide
gh secret set AZURE_STATIC_WEB_APPS_API_TOKEN --body "your-token-here"
# List configured secrets
gh secret list
- Revert commit and push to trigger new -Deployment-Guide
- Deploy previous version manually
- Switch traffic to previous environment
- Use GitHub release to deploy specific version
# Revert to last known good commit
git revert HEAD --no-edit
git push origin main
# Or reset to specific commit
git reset --hard <commit-hash>
git push --force-with-lease origin main
- ✅ Test build locally with production settings
- ✅ Run content validation checks
- ✅ Review -Configuration-Reference changes
- ✅ Check for broken links
- ✅ Verify Translation-Guide are complete
- ✅ Test on multiple devices/browsers
- ✅ Verify site loads correctly
- ✅ Check all languages work
- ✅ Test download links and PDFs
- ✅ Monitor performance metrics
- ✅ Check analytics tracking
- ✅ Validate SEO elements
- Weekly: Review -Deployment-Guide logs and metrics
- Monthly: Update dependencies and Hugo version
- Quarterly: Security audit and performance review
- Annually: SSL certificate and domain renewal check
🔙 Back to: Documentation Home
➡️ Next: Content Management