Skip to content

ci: migrate docs + vrt websites from netlify to azure #5450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 62 commits into from
Jun 25, 2025

Conversation

Rajdeepc
Copy link
Contributor

@Rajdeepc Rajdeepc commented May 7, 2025

Description

This PR migrates all preview deployments (documentation site, Storybook, and Visual Regression Tests) from Netlify to Azure Blob Storage for cost efficiency, and unified deployment strategy.
.
(JK, THE MAIN GOAL IS TO AVOID THE $20 BILL THAT JOSH IS PAYING OUT OF HIS OWN POCKET)
.
A quick overview of all the stuff I did in this PR

Key Changes:

Preview Deployments Now on Azure Blob Storage

CI/CD Pipeline Modernization

  • CircleCI config (.circleci/config.yml):

    • Adds an install-azcopy command for installing and authenticating AzCopy CLI.
    • Replaces all Netlify deployment steps with AzCopy uploads to Azure.
    • Updates the logic for determining the PR number and deployment path, closely mirroring GitHub Actions logic.
    • Removes Netlify and related deployment retries.
    • Lint and documentation jobs updated to streamline and target Azure deployment.
  • GitHub Actions:

    • Adds .github/actions/setup-azcopy composite action to set up AzCopy for workflows.
    • Adds .github/workflows/preview-docs.yml to build, deploy, and clean up PR documentation and Storybook on Azure.
    • Adds .github/workflows/trigger-ci-on-pr.yml to trigger CircleCI on PR open.
    • Updates .github/workflows/urls-smoke-test.yml to check Azure preview URLs and run smoke tests against them.

Documentation and User-Facing Changes

  • Preview URLs in documentation updated to point to Azure Blob Storage, e.g. the beta documentation link.
  • Automated PR comments now use Azure URLs for all previews (docs, Storybook, VRTs, and High Contrast Mode).
  • Playwright E2E tests updated to handle Azure URL structure (e.g., SWC_DIR path prefix).
  • Rollup config and asset URLs are now prefix-aware for Azure subdirectory deployments.

Dependency and Cleanup

  • Removes Netlify-specific scripts and dependencies (e.g., netlify-cli, Netlify deploy scripts, related code).
  • Cleans up preview quick-link assets and removes unused files.

Motivation and context

Operational Benefits:

  • Unified hosting on Azure for all preview artifacts.
  • Improved reliability and scalability, especially for PR and beta builds.
  • THE $20 BILL

Related issue(s)

  • SWC-900

Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • Open a PR and verify that:

    • Documentation and Storybook previews are posted as comments and accessible at the new Azure URLs.
    • Visual Regression Test (VRT) previews are available and updated for each PR.
    • Beta documentation is accessible at the new Azure location.
  • Ensure all CI jobs (CircleCI and GitHub Actions) succeed and the preview links are correct.

  • Check that all Netlify links/references are gone from docs and config.

  • Reviewers: See the posted PR comment for all preview links.

Device review

  • Did it pass in Desktop?
  • Did it pass in (emulated) Mobile?
  • Did it pass in (emulated) iPad?

Copy link

changeset-bot bot commented May 7, 2025

⚠️ No Changeset found

Latest commit: a6b7ed9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

github-actions bot commented May 7, 2025

Tachometer results

Currently, no packages are changed by this PR...

@Rajdeepc Rajdeepc changed the title ci: upgraded to azure from netlify ci: migrate netlify to azure May 9, 2025
@TarunAdobe TarunAdobe force-pushed the rajdeep/azure-circle-ci branch 11 times, most recently from 26c248d to 17651df Compare May 22, 2025 06:06
@adobe adobe deleted a comment from github-actions bot May 22, 2025
@TarunAdobe TarunAdobe force-pushed the rajdeep/azure-circle-ci branch 5 times, most recently from 98e4da9 to 982025f Compare May 22, 2025 10:53
@adobe adobe deleted a comment from github-actions bot Jun 10, 2025
@adobe adobe deleted a comment from github-actions bot Jun 10, 2025
@adobe adobe deleted a comment from github-actions bot Jun 10, 2025
@adobe adobe deleted a comment from github-actions bot Jun 10, 2025
@adobe adobe deleted a comment from github-actions bot Jun 10, 2025
@TarunAdobe TarunAdobe force-pushed the rajdeep/azure-circle-ci branch 3 times, most recently from 8f6eed3 to ade5424 Compare June 10, 2025 07:12
Comment on lines 47 to 52
# Set up Azure authentication
echo 'export AZCOPY_AUTO_LOGIN_TYPE="SPN"' >> $BASH_ENV
echo 'export AZCOPY_SPA_APPLICATION_ID="$AZURE_CLIENT_ID"' >> $BASH_ENV
echo 'export AZCOPY_SPA_CLIENT_SECRET="$AZURE_CLIENT_SECRET"' >> $BASH_ENV
echo 'export AZCOPY_TENANT_ID="$AZURE_TENANT_ID"' >> $BASH_ENV
source $BASH_ENV
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this necessary? Looks like we’re already setting these in the node environment.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, single quotes here prevent variable expansion, so we’d just be writing the literal strings (e.g. $AZURE_CLIENT_ID) into $BASH_ENV.

@Rajdeepc Rajdeepc changed the title ci: migrate preview-docs and visual tests from netlify to azure ci: migrate docs + vrt websites from netlify to azure Jun 23, 2025
@TarunAdobe TarunAdobe force-pushed the rajdeep/azure-circle-ci branch from 5aa31cd to 63ec4e7 Compare June 23, 2025 12:12
@TarunAdobe TarunAdobe force-pushed the rajdeep/azure-circle-ci branch from 63ec4e7 to 00799ac Compare June 23, 2025 13:19
@TarunAdobe TarunAdobe force-pushed the rajdeep/azure-circle-ci branch from 283d77e to b42fd37 Compare June 24, 2025 04:58
@TarunAdobe TarunAdobe force-pushed the rajdeep/azure-circle-ci branch from c095819 to 7ca2a12 Compare June 24, 2025 05:07
@TarunAdobe TarunAdobe force-pushed the rajdeep/azure-circle-ci branch from 63e10bc to b44ac75 Compare June 24, 2025 05:48
Copy link
Contributor

@rubencarvalho rubencarvalho left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor

@TarunAdobe TarunAdobe left a comment

Choose a reason for hiding this comment

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

APPROVAL GRANTED! IN FACT, APPROVAL ASCENDED TO MYTHICAL STATUS!

@Rajdeepc
Copy link
Contributor Author

Superb work @TarunAdobe ! This needs a celebration.

Copy link
Collaborator

@pfulton pfulton left a comment

Choose a reason for hiding this comment

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

@TarunAdobe would you mind taking checking on the beta URL? I tried hitting the URL in your original PR description (and then also tried putting the pr number in there and moving it around to different parts of the URL structure) and either I have the wrong URL or it didn't correctly deploy.

@TarunAdobe
Copy link
Contributor

@TarunAdobe would you mind taking checking on the beta URL? I tried hitting the URL in your original PR description (and then also tried putting the pr number in there and moving it around to different parts of the URL structure) and either I have the wrong URL or it didn't correctly deploy.

@pfulton Beta docs deploy only happens on main branch. so that link won't be accessible until this pr gets merged.

@rubencarvalho rubencarvalho enabled auto-merge (squash) June 25, 2025 08:39
@rubencarvalho rubencarvalho merged commit 4e100f7 into main Jun 25, 2025
23 of 26 checks passed
@rubencarvalho rubencarvalho deleted the rajdeep/azure-circle-ci branch June 25, 2025 09:53
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.

5 participants