Environment deployment

Hi Prismic,

I am a little confused on the environment functionality. You can create a development environment for your production repo. However, is there a way to stage document changes in the development environment and resync those change back to production? We would like to reduce copying from one environment to another as that will increase chance of error and is double work.

I read through Development Environments: the feature that allows to safely to test and iterate within Prismic without jeopardizing your production environment - Prismic and this part confused me:
"## How do I push things from the staging environment to my production environment?

You can resync your environments at any time — ensuring that your staging environment will have all of the latest content from your live website and allowing you to update your production environment once you are happy with any changes that you have made in your safe space."

This resyncing process remove all the changes to staging environment to match the production environment however is there a way to make the changes in the staging environment and deploy the staging environment to production?

Let's say I make a custom type change on the header slice in the staging environment with some document changes alongside with it. To deploy currently, I must copy the JSON for custom type in the staging environment to the production environment and then remove all instances of the header slice, re-add it, and fill the fields again. In changing this one slice I must change every document that uses the slice twice, once for testing and another for production. Is there any way to reduce this?

Regards,
Wenda Cai

Hello @wenda.cai

Thanks for reaching out to us.

At the moment there is only one way to Move Custom Types between environments: Environments - Prismic

Priyanka

Sorry it is a loaded question. I am more concerned how to "deploy" from an environment to production.
I want to be able to make changes in my staging environment then "deploy" that change to my production environment.

The question in https://prismic.io/blog/prismic-environments:

How do I push things from the staging environment to my production environment?

makes it seems possible to make a document change in the staging environment and then deploy to production environment without changing the production documents manually. However the resync functionality seems to be copying production environment to a staging environment but not the opposite.

What is more confusing is the phase " and allowing you to update your production environment once you are happy with any changes that you have made in your safe space." makes it seem like rebase is doing both copying staging environment to production environment and copying production environment to staging environment.

Could you explain how to copy changes from staging environment to production environment and how to copy changes from production environment to staging environment?

Just find out that rebase a staging environment removes all its own changes and match to another staging environment or production. I do not see a way for production environment to rebase with a staging environment.