Workflow & deployment

This is the workflow our team is striving for within the Netlify CMS platform. We are using Gatsby. We have a git repository with two branches: development and master. We want Netlify CMS to publish content/images to the development branch only; deployment not required. We have another process outside of Netlify that will test and merge development into master. At that point (push into master) we would like to have Netlify build/deploy the master branch to Netlify’s platform. I’ve tried to get this setup but had only partial success.

Questions:

  1. Is the workflow above achieveable? And if so, any suggestions on the configuration?
  2. What configuration controls Netlify CMS to publish into a specific branch? I modified static/admin/config.yml with “branch: development” but the CMS kept publishing it (content/images) into the master branch. I was assuming this was a bug; and something in Netlify was caching my old configurations. I tried re-deploying (clear cache and deploy) to no avail. I chose to delete the Netlify site and create a new one.
  3. What is the “Deploy contexts” -> “Production branch” parameter control? I am assuming that it monitors that branch; and when a change is detected then does a build/deploy to my netlify site/url. I have mine currently set to development, but I think for my case it should be master.
  4. Are there any issues if there are two separate netlify sites using the same git repo? We are considering separating the development branch workflow on one Netlify site; and configuring the master branch workflow on another Netlify site.

Hi @jkhongusc and welcome!
Answering the CMS related questions, setting the branch value under the backend configuration in config.yml should work. If it doesn’t can you make sure to upgrade to the latest version, and then share your site url and full config file here?
I also recommend looking into editorial workflow with the CMS:
https://www.netlifycms.org/docs/configuration-options/#publish-mode
And CMS events:
https://www.netlifycms.org/docs/beta-features/#registering-to-cms-events

1 Like