In this example repository for Commitspark, we provide a data model to manage content for a multi-language website that is built from individual content building blocks.
The example is meant as a starting-point for building your own data model by extending the schema file using standard GraphQL types.
Follow these steps to start working with this example:
- Copy this template
- Ensure the GitHub App you use to authenticate users in the Commitspark data editing frontend with GitHub grants access to this new repository
- Sign in to your Commitspark frontend instance
- Select your repository copy and start editing
An example GitHub workflow is included in this repository which demonstrates how content in pull requests can be validated using a QA pipeline equivalent to those used in software development.
To trigger a failure in this example workflow, do the following:
- On GitHub, create a new branch
- In the Commitspark editing frontend, select the new branch and create or modify a Page so that it contains a Hero
component where the string
invalid
is included in the Hero image'simageId
field - On GitHub, create a pull request to merge your new branch into
main
- The workflow should now create a pull request comment that invalid content was found
Using GitHub branch protection rules, you can configure GitHub to disallow merging of a pull request when a workflow has failed. This means you can prevent content that does not satisfy your QA criteria from being merged.