Deploy Storybook on Next.js Application on `/storybook`

Hi there,

me and my team would love to deploy our storybook together with our main application.

While the deployment runs butterly smooth, we’d like to have our storybook available via

Is that something that is doable with netlify and would be achievable with the netlify settings?

Help would be appreciated since Deploying Storybook - #6 by g-azambrano did not work unfortunately.


Hi @akratzel,

If you want to build both the websites on Netlify itself, it might be difficult. You would have to setup a build command that would build both the websites and output the final files in a separate folder. Depending on your build process, this might or might not be possible.

if you’re using GitHub, you could probably setup GitHub Actions and build both (or one) website(s) using that and just publish it on Netlify.

The easiest thing to do would be to build both your websites locally, copy them to the right folders and deploy that folder on Netlify, but you’d lose the power of CI.

The final option would be to use proxy redirects. You could setup the storybook website as another website and on the main application, you could setup a redirect like this:

  from = "/storybook/*"
  to = ""
  status = 200
  force = true

Let us know if this works for you or if you have any additional questions.