Skip to content

Create Amplify app

  1. Open the AWS Console → AWS Amplify
  2. Create new app → Host web app
  3. Choose GitHub as the repository provider
Amplify Create new app — Start building with Amplify, choose GitHub as the source code provider
  1. 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.

AWS Amplify GitHub App repository access — Only select repositories with amplify-astro-cicd selected, not All repositories
  1. On Add repository and branch, select the amplify-astro-cicd repository and branch main
Amplify Add repository and branch — select repository and branch, with tip about Amplify GitHub App permissions
  1. 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 is dist. Leave Password protect my site off. Leave Advanced settings alone. Click Next.
Amplify App settings — app name amplify-astro-cicd, build output dist, password protect off
  1. On Review, confirm repository amplify-astro-cicd, branch main, and build settings. Click Save and deploy. Wait until the main job succeeds.
Amplify Review — github jajera/amplify-astro-cicd main, then Save and deploy
  1. When the app overview shows main as Deployed, open Visit deployed URL (or https://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.
Amplify app overview — amplify-astro-cicd with main deployed as production branch and default amplifyapp.com URL
  1. In the Amplify app → Hosting → Branches (or overview) → Connect a new branch / Add branch
  2. Select Git branch staging
  3. Use the same build settings (amplify.yml)
  4. Deploy and wait until staging succeeds

When both branches are connected you should see main and staging with auto-build enabled:

Amplify Branches table — main and staging with auto-build enabled

Open both default URLs and confirm the Astro page loads:

  • https://main.<app-id>.amplifyapp.com
  • https://staging.<app-id>.amplifyapp.com
Browser open on https://main.…amplifyapp.com with the Astro sample home page
Browser open on https://staging.…amplifyapp.com with the Astro sample home page

This walkthrough stays on default Amplify domains - no custom domain step.

Next: Previews and automatic cleanup.