Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 17, 2025

Overview

This PR adds a new AdminAfterDeploy hook that prints the Admin application URL to the terminal after successful deployment. This makes it easier for users to access their admin application immediately after deployment.

Changes

New Hook: PrintAdminUrl.ts

Created a new hook in packages/project-aws/src/extensions/Webiny/PrintAdminUrl.ts that:

  • Implements the AdminAfterDeploy.Interface abstraction
  • Uses GetAppStackOutput to retrieve deployment stack output
  • Extracts the Admin URL from the stack output (supports both custom domains and CloudFront URLs)
  • Prints a formatted, user-friendly output to the terminal with environment details
  • Gracefully handles edge cases (preview deployments, missing stack output)

Hook Registration

Registered the new hook in packages/project-aws/src/extensions/Webiny.tsx alongside the existing UploadAdminAppToS3 hook, ensuring it runs after admin app deployment.

Output Example

After deploying the admin app, users will see:


Admin Application Deployed
‣ Environment: dev
‣ Admin URL: https://d1a2b3c4d5e6f7.cloudfront.net

Technical Details

  • The hook only executes when the admin app is deployed (when params.app === "admin")
  • Skips execution during preview deployments (params.preview === true)
  • Supports both appUrl (custom domain or CloudFront URL) and appDomain fields from stack output
  • Follows existing patterns used in other hooks like PrintDeploymentInfoAfterDeploy
  • No breaking changes to existing functionality

Benefits

  • Provides immediate visibility of the Admin URL after deployment
  • Reduces friction for users who need to access the admin panel
  • Consistent with the existing pattern of printing deployment information
  • Enhances developer experience by eliminating the need to run webiny info separately

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • download.cypress.io

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

I want you to create another after-admin-deploy hook, which will simply print Admin URL in the terminal

You can add this hook in the same folder as the packages/project-aws/src/extensions/Webiny/UploadAdminAppToS3.ts:24 and use the same AdminAfterDeploy implementation, again as in packages/project-aws/src/extensions/Webiny/UploadAdminAppToS3.ts:24

To get stack output, simply use GetAppStackOutput abstraction and call it for the same env into which the admin app was deployed

Note that we don't want this output to happen in case a whole webiny project has been deployed (via webiny deploy), only when admin specifically is deployed (via webiny deploy admin --env dev)


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Add after-admin-deploy hook to print Admin URL Add PrintAdminUrl hook to display Admin URL after deployment Oct 17, 2025
Copilot AI requested a review from adrians5j October 17, 2025 12:38
Copilot finished work on behalf of adrians5j October 17, 2025 12:38
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.

2 participants