Workflow
Last updated
Last updated
We maintain an export file of each Contentful content type in code, in order to use pull requests for reviewing changes to the Contentful content types. The export files are created via the .
Our Contentful space has three environments:
master
: Hosts our production content, and used for editorial workflows.
qa
: An exact copy of master
, refreshed weekly. Used to test any new changes before deploying or running on production.
dev
: A sandbox environment consisting of test campaigns, beta content types, and dummy data. Developers can experiment here without breaking anything on the production end or adding clutter to the master
environment. Migrations and new Content Types and fields can be fleshed out here, before moving forward to qa
and master
.
To create or edit a Contentful content type(s):
We'll use this branch to open a pull request to add or update export file(s) per the content type changes we'll be making.
dev
via Contentful UIUse the web interface to create new content type, or add, update, or remove fields from existing content types.
Upon success, you'll see:
Once you've added all changes into the contentful/content-types
files, open a pull request for review. We find it helpful to update/create the documentation for the content type within this pull request to help clarify the changes in the migration
qa
and master
.Once approved, the content type changes must manually be applied to the qa
and master
environments.
For updates to existing Content types, make the corresponding changes via the Contentful UI in the qa
and master
environments.
Upon success, you'll see:
You'll be prompted whether to run the migration. Upon answering yes:
for each content type added or edited, saving it to the relevant contentful/content-types
file, e.g. contentful/content-types/currentSchoolBlock.js
For brand new Content types, it’s easiest to run the CLI command to add new content types to the qa
and master
environments:
The migrations found in the contentful/migrations
directory are from an earlier iteration of this workflow. We no longer add migrations here, but these files .