Skip to content

Conversation

@ryan-mist
Copy link
Contributor

@ryan-mist ryan-mist commented Jul 22, 2025

Fixes #N/A

Description
Added GitHub workflows for the deployment and preview of the Amplify hosted karpenter.sh website to prepare for Netlify to Amplify hosting migration.

  • On a push to main in which the website folder is changed, website-deploy.yaml is triggered and deploys the website to the prod amplify branch.
  • On a PR to main in which the website folder is changed, website-preview.yaml is triggered. It creates a new (or updates existing) amplify branch for that PR and deploys the website. A comment is added to the PR request linking the website build.
    • Redirects in amplify do not naively work with _redirects, so test/hack/resource/parse-redirects/main.go reads the _redirects file and adds custom rules to mimic current behavior. It scrapes the versions to replace wildcards with from website/content/en
  • On a PR close to main, cleanup-pr-preview.yaml is triggered and the website deployment infrastructure for that PR is cleaned up
  • Amplify handles URLs differently than, sonavbar-version-selector.html fixes this issue with the version selector bar

How was this change tested?
Creating the infrastructure (i.e. S3 bucket, amplify app, and IAM roles) in personal AWS account and running each workflows by:

  1. Creating a PR and verifying Amplify Preview and Github Comment
  • The github preview comment looks like:
Screenshot 2025-07-21 at 9 52 30 PM
  1. Merging/Closing PR and verifying files in S3 and Amplify app are cleaned up.
  • The preview build is hosted in the S3 bucket under /pr-# and looks like:
Screenshot 2025-07-21 at 10 11 32 PM
  • The preview app is deployed under a branch /pr-# and looks like:
Screenshot 2025-07-21 at 10 10 21 PM
  1. Merging/Pushing PR and verifying main version of website is updated.

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No (not yet)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@netlify
Copy link

netlify bot commented Jul 22, 2025

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit 70c1f73
🔍 Latest deploy log https://app.netlify.com/projects/karpenter-docs-prod/deploys/688b9e496c892b000750f821

@coveralls
Copy link

coveralls commented Jul 22, 2025

Pull Request Test Coverage Report for Build 16654975539

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 67.385%

Totals Coverage Status
Change from base Build 16600970373: 0.0%
Covered Lines: 7347
Relevant Lines: 10903

💛 - Coveralls

@ryan-mist ryan-mist force-pushed the amplify-workflow branch 2 times, most recently from 983652a to 338125f Compare July 22, 2025 21:28
@ryan-mist ryan-mist force-pushed the amplify-workflow branch 4 times, most recently from 0468473 to 8a3fdd6 Compare July 23, 2025 04:50
@ryan-mist ryan-mist marked this pull request as ready for review July 31, 2025 16:48
@ryan-mist ryan-mist requested a review from a team as a code owner July 31, 2025 16:48
@ryan-mist ryan-mist requested a review from engedaam July 31, 2025 16:48
Copy link
Contributor

@engedaam engedaam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@ryan-mist ryan-mist merged commit 0ed0bcb into aws:main Jul 31, 2025
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants