BaryoDev / BaryoDev/barakoCMS

Build triggers: fire a static build when content publishes, once per burst

Open
#559 0 comments 0 reactions 0 assignees View on GitHub
enhancement module
Dominant language
C#
Stars
6
Forks
7
Avg merge
4h 42m
Merged PRs (30d)
307

Description

A static build has to be told when to run. Today nothing tells it.

Add a trigger that fires a build when content publishes: Netlify and Vercel build hooks, Cloudflare Pages, and GitHub `repository_dispatch`. All four are the same shape, a POST to a URL with a secret, so this is one action with four presets rather than four integrations.

## Check this first

`barakoCMS/Features/Workflows/Actions/WebhookAction.cs` already posts to a URL on a workflow trigger, with signing under way in #95. If a publish can already run a workflow that calls a webhook, then most of this is a documented preset and a walkthrough, not code. Confirm before building anything.

## What is actually missing either way

**Debounce.** Publishing twelve entries in a minute must fire one build, not twelve. A build hook has no idempotency, so every fire costs a full build on the provider's plan. A quiet period, configurable, with a single pending build.

**Failure is visible.** A build hook that returns 500 has to show up somewhere the editor looks. `WebhookDeliveries` already exists for this.

## Done when

- Publishing an entry fires exactly one build for a burst of publishes inside the quiet period.
- A failed trigger is recorded and visible, not swallowed.
- `docs/` shows the Netlify and Cloudflare Pages setup end to end.

Contributor guide

Open the contributing guide

Research direction

Start with barakoCMS/Features/Workflows/Actions/WebhookAction.cs and confirm whether an existing publish workflow can cover the provider presets before building new code. Then trace the publish trigger and inspect WebhookDeliveries for recording failures. Done means one build per quiet-period burst, visible failed triggers, and end-to-end Netlify and Cloudflare Pages setup in docs/.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, github
Domain
backend, cloud, devops, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.