Call the shared website build workflow - #5515
Conversation
test.yml and FlowFuse/flowfuse's docs.yml both carried their own copy of the same pipeline: app token, website and blueprint-library checkouts, Node 24, blueprints, install, build, hyperlink. Two copies of one build, already drifting, and the flowfuse copy threw its output away after the link check. site-preview.yml is now the single definition, called from both sides. The flowfuse caller passes its PR as docs_repository/docs_ref, which lands the checkout next to the website so docs-sync.mjs prefers it over cloning main, and sets deploy_preview so the build is uploaded to Netlify under a per-PR alias instead of being discarded. Two behaviour notes: - Previews build with `build:nuxt` rather than `build:nuxt:skip-images`, because nuxt.config.ts drops the image provider to none when SKIP_IMAGES is set. This matches netlify.toml's deploy-preview context. - The image cache key was static, so the entry was written once and never refreshed, and it pointed at the Eleventy-era `_site/img`. It is now a rolling key over the two directories netlify.toml's cache plugin keeps warm. The upload never passes --prod and never passes --build, so netlify.toml's build command (which reindexes Algolia) does not run against a preview, and a step fails the job if Netlify hands back the production URL. test_website is kept as a gate job because a reusable workflow reports its checks as "caller job / called job", which would rename the context the "protect main" ruleset requires.
… absent A caller that sets deploy_preview without passing the token or site id would otherwise get an opaque netlify-cli error.
✅ Deploy Preview for flowforge-website ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@dimitrieh Could you elaborate on the skip-images point? The way it's worked so far is just skipping image optimization, images are still "real" and visible either way. The reason we skip it is that it takes longer than necessary for a preview, and with Netlify's recent issue where it drops the cache for no reason, we were getting ~90min builds on random production deploys too, so it's currently disabled for production as well. |
ppawlowski
left a comment
There was a problem hiding this comment.
- Please move the reusable GitHub Actions workflow to the
FlowFuse/github-actions-workflowsrepository - Address my comments while moving
The build now lives in FlowFuse/github-actions-workflows, so this repository and FlowFuse/flowfuse documentation pull requests share one definition. Review feedback also drops the separate gate job: the calling job is named test_website, so the required context becomes test_website / Build and check and the ruleset moves to that name.
|
Makes sense, that's where it belongs. Both points are done:
Both callers point at the One trade-off worth naming: a build change can't be tested in the PR that makes it any more, since the caller has to point at a merged ref. That's why it started here, but I'd rather follow the convention. Two things I'd like back from you:
|
|
@ppawlowski moved to FlowFuse/github-actions-workflows#211, comments addressed, replies above. This one is just the caller now. |
|
The
|
The og-image cache step main added in #5562 cannot live in the caller: a job that uses a reusable workflow takes no steps of its own. It has to move into build_website.yml in FlowFuse/github-actions-workflows.
|
@ppawlowski done: merged main, ref is now Two blockers left:
|
I will update it once this PR is merged
Update the introduced reusable workflow if needed. |
|
@ppawlowski can you check what still needs to be changed? Not sure what needs changing still or what your review refers to |
|
@ppawlowski the ruleset has to change before this merges, not after.
So the required check never arrives and the pull request stays blocked. The ruleset has no bypass actors, so there is no way around it. Point the required context at |
|
The order in which things need to happen is also defined in the issue managing this effort across repos: https://github.com/FlowFuse/engineering/issues/237 |

Contributes to Website preview on documentation pull requests.
Description
Calls the shared
build_website.ymlin FlowFuse/github-actions-workflows instead of keeping a second copy of the website build here. Same steps, one definition, shared with FlowFuse/flowfuse documentation pull requests.The job keeps its name, so the reported check becomes
test_website / Build and check. Theprotect mainruleset has to require that context before this merges.Related Issue(s)
Checklist