Create Amplify app
Create the app in the Console
Section titled “Create the app in the Console”- Open the AWS Console → AWS Amplify
- Create new app → Host web app
- Choose GitHub as the repository provider
- Authorize / install the Amplify GitHub App
Amplify GitHub App - OAuth install that lets Amplify clone your repo and receive push/PR webhooks without a long-lived personal access token. for your user or organization
On the GitHub App install / permissions screen, choose Only select repositories and grant access to amplify-astro-cicd only. Do not select All repositories.
- On Add repository and branch, select the
amplify-astro-cicdrepository and branchmain
- On App settings, confirm Amplify detected amplify.yml
Root amplify.yml file that tells Amplify how to install, build, and which artifact directory to publish. — Build output directory isdist. Leave Password protect my site off. Leave Advanced settings alone. Click Next.
- On Review, confirm repository
amplify-astro-cicd, branchmain, and build settings. Click Save and deploy. Wait until themainjob succeeds.
- When the app overview shows
mainas Deployed, open Visit deployed URL (orhttps://main.<app-id>.amplifyapp.com) and confirm the Astro page loads. Record your app id from the overview — you need it for staging and preview URLs.
Add the staging branch
Section titled “Add the staging branch”- In the Amplify app → Hosting → Branches (or overview) → Connect a new branch / Add branch
- Select Git branch
staging - Use the same build settings (
amplify.yml) - Deploy and wait until
stagingsucceeds
When both branches are connected you should see main and staging with auto-build enabled:
Open both default URLs and confirm the Astro page loads:
https://main.<app-id>.amplifyapp.comhttps://staging.<app-id>.amplifyapp.com
This walkthrough stays on default Amplify domains - no custom domain step.