gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.29k stars 10.31k forks source link

[gatsby-plugin-netlify-cms] Multiple git branches support #21011

Closed tristanMatthias closed 4 years ago

tristanMatthias commented 4 years ago

Summary

I would like to be able to configure what git branch my Netlify CMS instance uses. Currently, I have not found any way to pass in environment variables from Gatsby to Netlify (attempted webpack configs)

Motivation

This allows us to deploy to multiple environments and the content is linked to the current environment, not the one setting for all.

deriegle commented 4 years ago

It looks like this is probably a limitation on the Netlify side of things and not Gatsby.

According to this section in their docs which gives you all the options that you can set in your config.yml file, Netlify currently only supports a single git branch.

tristanMatthias commented 4 years ago

Yeah, that's what I was afraid of. Ok, thanks @deriegle