Migrate production frontend to Static Web Apps - #440
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds Azure Static Web Apps (SWA) support for the production frontend by introducing SWA runtime configuration (headers/MIME/404), staging a production video asset during deployment, and extending the existing GitHub Actions CD workflow to also deploy the v2 artifact to the Free sticker SWA (while keeping the current Blob/Front Door path for rollback).
Changes:
- Add
staticwebapp.config.jsonfor SWA caching headers, MIME overrides, and custom 404 handling. - Update the website build pipeline to ensure Puppeteer is installed before running
react-snap. - Extend
fe-cd.ymlto stage the production MP4 and deployv2builds to Azure Static Web Apps using a deployment token fetched at runtime.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
website/public/staticwebapp.config.json |
Adds SWA config for cache headers, MIME types, and 404 rewrite. |
website/package.json |
Updates snap script to install Puppeteer before running react-snap. |
.github/workflows/fe-cd.yml |
Stages a video file into the deploy artifact and deploys v2 to SWA using an API token fetched via Azure CLI. |
Comments suppressed due to low confidence (1)
website/public/staticwebapp.config.json:40
- This route also uses brace expansion (
/*.{html,json,webmanifest,zip}), which isn’t supported by Azure Static Web Apps route matching; the intended caching headers may never be applied for these extensions.
{
"route": "/*.{html,json,webmanifest,zip}",
"headers": {
"Cache-Control": "public, max-age=604800"
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…em Chrome fallback When puppeteer's Chrome download fails silently, react-snap previously received no Chrome binary and failed with ENOENT. The new snap.js: 1. Cleans up stale .local-chromium if binary is missing 2. Tries puppeteer install.js to download Chrome 3. Falls back to system Chrome (google-chrome-stable, etc.) if download fails 4. Runs react-snap as a subprocess with PUPPETEER_EXECUTABLE_PATH set correctly
Stop publishing the retired integration frontend, deploy production only to Blob and Static Web Apps, and pin CI to supported Node LTS releases. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v2artifact to the FreestickerStatic Web Appmainintegration frontend deployment and remove all Azure Front Door purge/domain dependencies$webpublishing as an origin-level rollback while Static Web Apps serves productionlatestreleaseValidation
salmon-sea-01436e000.7.azurestaticapps.netsticker.newfuture.ccis bound to the Static Web App with Azure statusReady206responsesreact-snaproutesstickers.newfuture.cchas already moved away from Front Door and returned byte-identical Blob samplesAfter this PR is merged and the production workflow succeeds, the obsolete
stickers-cdnFront Door profile can be deleted.