Staging and PR previews
Feature work → PR preview
Temporary Amplify hosting URL created for a pull request so you can review the built site before merge. → staging
Long-lived Git branch (and Amplify branch) used as a pre-production environment before promoting to main. → main. GitHub Actions is the merge gate; Amplify
AWS Amplify Hosting - managed CDN hosting for front-end web apps. Git-connected continuous deployment is one option; this lab uses that path for branch and PR preview URLs.
Amplify Hosting docs builds from amplify.yml
Root amplify.yml file that tells Amplify how to install, build, and which artifact directory to publish. in parallel.
- Branch → PR into
staging(CI green; Amplify builds a preview) - Merge → validate on
https://staging.<app-id>.amplifyapp.com - PR
staging→main(same CI gate — protectstagingwith Restrict deletions first so auto-delete head branches cannot remove it) - Merge →
https://main.<app-id>.amplifyapp.com
Preview hosts: delete them in the Amplify Console, or enable automatic branch deletion
Amplify setting that automatically removes a preview host when its Git branch is deleted. Same end state as deleting that Amplify branch in the Console. so Amplify removes them when the Git branch is gone. Neither deletes the Amplify app.
Next: Prerequisites.