Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

You can make a Storybook build available from an Azure DevOps pipeline without deploying it to a website: build its static files, then publish the output folder as a pipeline artifact. Teammates can retrieve or download those files from the run summary, but they will not get a browser-accessible Storybook URL.

What “show Storybook” means without hosting

Storybook builds into a static web application. Publishing its files as an Azure Pipelines artifact attaches them to a pipeline run for retrieval or use by a downstream pipeline; it does not serve the application as a website. Microsoft describes PublishPipelineArtifact@1 as a way to upload a file or directory as a named artifact for the current run.

Approach What teammates receive Separate hosting? Fits when
Azure Pipelines artifact Files to inspect or download from a pipeline run No Build handoff, archival, or downstream pipeline use
Static host or Storybook publishing service A browser-accessible Storybook URL Yes Interactive review by teammates or stakeholders

Build and publish the Storybook artifact

  1. Confirm the repository’s package manager, Storybook build script, and output directory. Storybook’s build documentation uses npm run build-storybook as the standard command, and its tutorial identifies storybook-static as the output directory. Verify the actual output path configured for your project before adding it to the pipeline.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  2. Add a build step followed by an artifact publish step in the build pipeline. This example assumes npm and an npm script named build-storybook; adapt the install command and script to your repository:

    steps:
      - script: npm ci && npm run build-storybook
        displayName: Build Storybook
      - publish: storybook-static
        artifact: storybook

    On Azure DevOps Services, the YAML publish shortcut publishes the specified folder as an artifact named storybook. The shortcut is equivalent to using the PublishPipelineArtifact@1 task.

  3. Run the pipeline, then open the completed run and select its artifact in the run summary to inspect or download the files. The download is the generated build output, not a hosted Storybook page.

Choose the artifact task for your Azure DevOps edition

The YAML shortcut and Pipeline Artifacts are supported in Azure DevOps Services. If you use Azure DevOps Server or TFS 2018, Microsoft says Pipeline Artifacts are not supported there; use Publish Build Artifacts instead. The workflow described here is for a build pipeline: Microsoft’s Pipeline Artifacts documentation says publishing pipeline artifacts is not supported in release pipelines.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot an incomplete artifact

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check access and retention in your organization

Artifact publication makes the files available through the pipeline run, but the specific people who can access that run and how long its artifacts remain available depend on your Azure DevOps organization’s permissions and retention settings. Check those policies before relying on an artifact as a long-term archive or sharing route.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.