Deploy pipeline
AddNetlifyDeployPipeline registers a sequence of pipeline steps that turn an
aspire deploy invocation into a working Netlify deploy. The steps run in order,
once per deploy run:
- Install Netlify CLI — runs
npm install -g netlify-cliifntlcannot be resolved onPATH. After install, the npm-global bin directory is prepended to the current process’sPATHso subsequent steps find the binary. - Authenticate with Netlify — resolves the auth token using the documented
precedence. If the token is empty, runs
ntl loginonce. - Resolve / create site — looks up the Netlify site ID via
--siteor creates a new one with--create-site <name>whenCreateSiteis set. - Deploy — invokes
netlify deploywith the configured arguments.
Customising the pipeline
Section titled “Customising the pipeline”AddNetlifyDeployPipeline is an extension on IDistributedApplicationPipeline.
You can compose extra steps before or after it using the standard pipeline APIs.
builder.Pipeline .AddStep(MyCustomPreflight) .AddNetlifyDeployPipeline() .AddStep(MyCustomNotification);Diagnostics
Section titled “Diagnostics”- Each step shows a top-level entry in the Aspire dashboard’s pipeline view with its arguments redacted.
- Failed steps include the underlying Netlify CLI output. To see the full
netlify deploy --jsonpayload, raise theAspire.Hosting:LogLeveltoTracefor local debugging only. ~/.aspire/deployments/<sha>/<environment>.jsonrecords the successful deploy state. CI can cache and restore this folder to track deploys across runs.