mdx-embed icon indicating copy to clipboard operation
mdx-embed copied to clipboard

Deploy "examples"

Open PaulieScanlon opened this issue 3 years ago • 2 comments

After speaking with @molebox it's probably a good idea to get each of the examples deployed somewhere and from here in Storybook docs we can advise users on how to install MDX Embed for each of the examples, point them to both a dir in the repo and an online site

The current examples are:

  • [ ] gatsby-demo
  • [ ] mdx-deck-demo
  • [ ] next-mdx-deck-demo
  • [ ] next-mdx-demo

Once i've worked out how best to deploy this without messing up the build pipeline i'll back back in on this issue with links to where they can be seen

PaulieScanlon avatar Sep 09 '20 13:09 PaulieScanlon

I gave this a go and created a new site from Git in Netlify and pointed the build command at the build command in root package.json for the gatsby-demo and set the publish dir to examples/gatsby-demo

but...

The build keeps failing complaining it can't find the mdx-embed package... i don't know why this? the * should just mean it installs from npm right? or does it need a version number if it can't resolve the node_modules locally?

Either way i've killed my build minutes for this months so will have to circle back to this.

PaulieScanlon avatar Sep 09 '20 15:09 PaulieScanlon

Ok i know what this is now...

When i was deploying to Netlify i wasn't building the package. All the demo use "mdx-embed" "*" which will resolve to mdx-embed/dist but when deploying the dist dir isn't there 🤦 so a yarn build needs to be part of the Netlify .toml so the package is built... i'll give this another stab later to check that is what the problem is

PaulieScanlon avatar Sep 11 '20 16:09 PaulieScanlon