Deploy a storybook via Azure Devops to Azure Static Web App

olaj

Ola Johansson

Posted on October 11, 2022

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.

💖 💪 🙅 🚩
olaj
Ola Johansson

Posted on October 11, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related