How to Build a Gatsby Site Using a Specific Pipeline Stage?

My goal is to have 4 different pipelines/branches with each having its own release(s). This will give our content editors the ability to work on 4 independent releases.

I am attempting the following (see list of branches and API keys listed below):

  1. In my gatsby-config.js, I changed the gatsby-source-storyblok accessToken to the value of the token: preview (Marketing 1)
  2. Release created (Viking Horn version 2020), stories updated and scheduled.
  3. I switched to the Marketing 1 Branch/Pipeline and clicked Deploy from Source (with Viking Horn version 2020 as the selected release to deploy).
  4. This is where I am stuck. What do I do next in order to show the Viking Horn 2020 release updates / Marketing 1 pipeline on my local Gatsby site? I’ve tried clicking the Release now button (while on the marketing 1 pipeline), then running gatsby develop, but no release updates are shown.

Branches:

  • Staging
  • Live
  • Marketing 1
  • Marketing 2
  • Marketing 3
  • Marketing 4

API-Keys:

  • preview (Marketing 1)
  • preview (Marketing 2)
  • preview (Marketing 3)
  • preview (Marketing 4)
  • public (Marketing 1)
  • public (Marketing 2)
  • public (Marketing 3)
  • public (Marketing 4)
  • public
  • preview

Hello Ed,

can you give us more information about the issue, please?
Are you using a new cv value after you deployed the content on the branch?
We need the exact request which isn’t giving you the updated content.

Hello Hannes,

To answer your questions:

Are you using a new cv value after you deployed the content on the branch?

Yes, I think I am using a new cv value after I deploy the content to the branch? I am using gatsby-source-storyblok to build the site It looks like line 24 of sync.js adds the cv parameter. Is that right?

We need the exact request which isn’t giving you the updated content.

I’m trying to find the request, but no luck so far. Any tips for tracking that down?

If it helps, here is the URL of the story with the Marketing 1 branch selected and Viking Horn version 2020 release selected. With those selections, the Product Name field in the story has the suffix “Updated in 2020”.
http://app.storyblok.com/#!/me/spaces/86211/stories/2187/9580/16264813

I’m using gatsby-source-storyblok to get data from Storyblok as shown in gatsby-storyblok-boilerplate’s gatsby-node.js file:

I tried using the Storyblok Graphiql interface with my preview (Marketing 1) token. The result is that the product_name field for the story “Granite Needle XTR Pointed Rocks” does not have the desired suffix “Updated in 2020”.
https://gapi-browser.storyblok.com/?token=orqir…(token trunkated)
Query:
{
RockstoreproductItems {
items{
content {
product_name
}
}
}
}

1 Like

I tried again and it seems to be working now. Most likely, I was missing a step before.

Here are the steps I followed:

  1. In my gatsby-config.js, I changed the gatsby-source-storyblok accessToken to the value of the token: preview (Marketing 1)

  2. Release created (Viking Horn version 2020), stories updated and scheduled.

  3. I switched to the Marketing 1 Branch/Pipeline and clicked Deploy from Source (with Viking Horn version 2020 as the selected release to deploy).

  4. Switch the release to Viking Horn version 2020.

  5. Click Release Now

  6. In the terminal: gatsby develop

The content from the release is shown as expected.
And, it seems that the release was only released in the Marketing 1 branch as expected.

2 Likes