DEV Community

Ola Johansson
Ola Johansson

Posted on

3 1

Deploy a storybook via Azure Devops to Azure Static Web App

I've spent the morning trying to deploy my static storybook to a Azure Static Web App. I've found a few blog posts about it but they seemed a bit outdated.

Finally i figured out that you could just do everything with the AzureStaticWebApp pipeline task.

For me it worked to just add this command to a pipeline.

- task: AzureStaticWebApp@0
  inputs:
    app_build_command: 'yarn build-storybook'
    output_location: '/storybook-static'
    skip_app_build: false
    is_static_export: true
    azure_static_web_apps_api_token: '$(deployment-token)'
Enter fullscreen mode Exit fullscreen mode

You will need to add a $(deployment-token) variable that you will find on your static web app in Azure, but otherwise that was all i needed, no need to run any custom yarn commands and so on.

Top comments (1)

Collapse
 
slugmandrew profile image
Drew Spencer

This was useful! Thanks :)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay