I’m new to DataCMS! I want to create a separate staging environment for our website built with Jekyll and DatoCMS (different deployment, different models etc). I already have a separate deployment on Netlify for the dev branch of our repo. I just created a new ‘staging’ environment on DatoCMS admin dashboard. How do I make the staging deployment on Netlify point to the staging environment (and not the live environment) on DatoCMS? When I go to the API keys section under the staging env, I still see the same API keys (as the ones in the live environment) so I’m a bit confused.
My usecase for creating a new staging env is to safely test new and modified models (changes to our schema).
does doing something like bundler exec dato dump --token=<api_token> --environment=staging work? I tried it out, but seems like it didn’t get the schema changes I made on the admin ui
Thanks for the detailed info and for welcoming me in this vibrant community! If the --environment flag works, any idea why did it not work when I did bundler exec dato dump --token=<api_token> --environment=staging ?
I added a new field in a model in the staging env via the web UI. If I understand correctly, after adding the field, when I run the dato dump command again, I should see it in the respective .yml file correct?
@raivat The best way to check if you are fetching the new environment would be to create a new record on the new environment, and trying to fetch it using Other SSGs - Accessing records - DatoCMS Docs if you can fetch it, then you can be sure that the flag is working, if not, let us know so we can try and reproduce the issue
Thanks so much for this @m.finamor ! I was able to use this and see a newly created record (on my local jekyll preview). However, I’m confused to see that I can’t find this new field in my local .yaml file. Is that expected behaviour or something is wrong? Thanks!
@raivat great! Regarding the .yaml file, can you send it to us at support@datocms.com so we can take a look at it? I can follow up with you there directly