Add a Gatsby Rebuild Button for Drupal

Created on 16 February 2023, almost 2 years ago
Updated 21 March 2023, almost 2 years ago

Problem/Motivation

There are entities that when updated do not count as published content. As a content creator, I want to be able to make Gatsby rebuild to use the new content without contacting my developers.

I need a button that can trigger the rebuild. We have content moderation, so I only want specific roles to be able to trigger the rebuild. We also have multiple environments that the button will need to account for.

Steps to reproduce

When updating menus or taxonomy terms the Gatsby site doesn't rebuild from these changes.

Proposed resolution

A module that adds a button that responds to user permissions and gatsby configuration settings to rebuild Gatsby manually from Drupal.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Closed: won't fix

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States oheller

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @oheller
  • πŸ‡ΊπŸ‡ΈUnited States oheller

    I have created a submodule to add the button. It pulls the site id from the gatsby.settings:incrementalbuild_url to trigger the correct Gatsby environment.

    I've included 2 patches. One to be included using the composer.json patches option. The other is to be applied with git from the project root using `git am file.patch`.

  • Status changed to Needs review almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States oheller
  • πŸ‡ΊπŸ‡ΈUnited States oheller
  • Status changed to Closed: won't fix almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States apmsooner

    The "Only trigger builds for published content" setting when turned off is designed to trigger builds for any entity type selected. There are some improvements to be made still on the firing of those events but otherwise, I think there are other modules that already have this capability to trigger a webhook and probably better served through that effort. Try this one: https://www.drupal.org/project/build_hooks β†’

Production build 0.71.5 2024