Skip to content

fix: polish and improve deploy command output #7250

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

serhalp
Copy link
Collaborator

@serhalp serhalp commented May 1, 2025

Summary

As in #7249, this makes misc. improvements to the output of ntl deploy, in order to improve the signal-to-noise ratio, improve clarity, and make it a little more pleasant to look at:

  • Move deploy URL to its own primary section in a Netlify-cyan callout box with distinctive diamond
    • It's the primary call-to-action, so it should be the primary focus rather than be buried with the three other URLs
    • It's a little more celebratory/satisfying
  • Remove redundant "draft" vs. "production" line (mentioned in new box now)
    • This incidentally fixes a rendering bug, where "Uploading blobs to deploy store" with a spinner gets frozen in a weird place
  • Use OSC 8 "terminal links" when supported
  • Suppress redundant blobs upload build output
    • This was basically printing the huge "Netlify Build" section a second time for no benefit (see gifs below)
  • Improve spacing between sections
  • Add "Deploying to Netlify" and "Deploy complete" section headers to improve visual grouping
  • Fix edge function step node.js warnings
  • Fix deploy progress spinners' final states (regressed 1-2 months ago I believe)

Before

Monosnap screencast 2025-05-01 17-34-21

After

(the first few seconds are the same, but the full log is relevant to understand redundancy and consistency)
Monosnap screencast 2025-05-01 17-15-59

and for completeness here's a production deploy:
image

Notes

Reviewer, I suggest reviewing by commit!

Copy link

github-actions bot commented May 1, 2025

📊 Benchmark results

Comparing with 7a5b7c0

  • Dependency count: 1,150 (no change)
  • Package size: 280 MB ⬆️ 0.00% increase vs. 7a5b7c0
  • Number of ts-expect-error directives: 390 ⬇️ 2.31% decrease vs. 7a5b7c0

),
)
log('If everything looks good on your draft URL, deploy it to your main site URL with the --prod flag:')
log(chalk.cyanBright.bold(`netlify deploy${runBuildCommand ? '' : '--no-build'} --prod`))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is unrelated, just a little thing we missed in #7195

@@ -893,11 +903,8 @@ export const deploy = async (options: DeployOptionValues, command: BaseCommand)
deployToProduction,
})
}
const isIntegrationDeploy = command.name() === 'integration:deploy'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

dead code, integration:deploy was removed in December

@@ -16,7 +16,7 @@ export const sitesList = async (options: OptionValues, command: BaseCommand) =>

const sites = await listSites({ api, options: { filter: 'all' } })
if (spinner) {
stopSpinner({ spinner })
spinner.success()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oops, sorry, another unrelated change — when I was fixing the deploy spinner end state I searched for others with the same pattern and found this one

@serhalp serhalp marked this pull request as ready for review May 1, 2025 22:04
@serhalp serhalp requested a review from a team as a code owner May 1, 2025 22:04
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.

1 participant