Skip to content

Call the shared website build workflow - #5515

Merged
ppawlowski merged 9 commits into
mainfrom
docs-preview-shared-build
Aug 14, 2026
Merged

Call the shared website build workflow#5515
ppawlowski merged 9 commits into
mainfrom
docs-preview-shared-build

Conversation

@dimitrieh

@dimitrieh dimitrieh commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Contributes to Website preview on documentation pull requests.

Description

Calls the shared build_website.yml in 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. The protect main ruleset has to require that context before this merges.

Related Issue(s)

Checklist

  • I have read the contribution guidelines
  • I have considered the performance impact of these changes
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
  • For blog PRs, an Art Request has been created (instructions)

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.
@dimitrieh

Copy link
Copy Markdown
Contributor Author

@dimitrieh

Copy link
Copy Markdown
Contributor Author

@netlify

netlify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Deploy Preview for flowforge-website ready!

Name Link
🔨 Latest commit 6b39d6c
🔍 Latest deploy log https://app.netlify.com/projects/flowforge-website/deploys/6a7eb21fed05fc000865e836
😎 Deploy Preview https://deploy-preview-5515--flowforge-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 68 (🟢 up 3 from production)
Accessibility: 96 (no change from production)
Best Practices: 100 (no change from production)
SEO: 85 (🔴 down 7 from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@Yndira-E

Yndira-E commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@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 ppawlowski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Please move the reusable GitHub Actions workflow to the FlowFuse/github-actions-workflows repository
  2. Address my comments while moving

Comment thread .github/workflows/site-preview.yml Outdated
Comment thread .github/workflows/site-preview.yml Outdated
Comment thread .github/workflows/site-preview.yml Outdated
Comment thread .github/workflows/site-preview.yml Outdated
Comment thread .github/workflows/test.yml Outdated
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.
@dimitrieh dimitrieh changed the title Extract the site build into a reusable workflow Call the shared website build workflow Aug 10, 2026
@dimitrieh

Copy link
Copy Markdown
Contributor Author

Makes sense, that's where it belongs. Both points are done:

Both callers point at the add-website-build-workflow branch until #211 lands, then move to @main. Merge order is workflows repo, then here, then flowfuse.

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:

  • The "protect main" ruleset needs to move to test_website / Build and check before this merges.
  • I've pushed back on the token scoping comment, take a look and tell me if I'm wrong there.

@dimitrieh
dimitrieh requested a review from ppawlowski August 10, 2026 14:19
@dimitrieh

Copy link
Copy Markdown
Contributor Author

@ppawlowski moved to FlowFuse/github-actions-workflows#211, comments addressed, replies above. This one is just the caller now.

@ppawlowski

Copy link
Copy Markdown
Contributor

The build_website reusable workflow has been released. Please:

  1. Resolve conflicts
  2. Update the reference tag to build_website/v1

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.
@dimitrieh

dimitrieh commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

@ppawlowski done: merged main, ref is now build_website/v1. The run reports as test_website / Build and check, so the tag resolves.

Two blockers left:

  • The "protect main" ruleset still requires the context test_website, which no longer reports. It needs to be test_website / Build and check.
  • Website output content cache (Website output content cache #5562) added an og-image cache step to test_website on main. A uses: job takes no steps, so the merge drops it. It has to move into build_website.yml, and its github.run_id key needs replacing with a content-based one.

@ppawlowski

Copy link
Copy Markdown
Contributor

The "protect main" ruleset still requires the context test_website

I will update it once this PR is merged

Website output content cache (#5562) added an og-image cache step to test_website on main. A uses: job takes no steps, so the merge drops it. It has to move into build_website.yml, and its github.run_id key needs replacing with a content-based one.

Update the introduced reusable workflow if needed.

@dimitrieh

Copy link
Copy Markdown
Contributor Author

@dimitrieh

Copy link
Copy Markdown
Contributor Author

@ppawlowski can you check what still needs to be changed? Not sure what needs changing still or what your review refers to

@dimitrieh

dimitrieh commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

@ppawlowski the ruleset has to change before this merges, not after.

protect main requires a check named test_website. That name is gone. The check is now named test_website / Build and check.

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 test_website / Build and check and this merges on its own. Everything else is green.

@dimitrieh

Copy link
Copy Markdown
Contributor Author

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

@ppawlowski
ppawlowski merged commit 73bd476 into main Aug 14, 2026
7 checks passed
@ppawlowski
ppawlowski deleted the docs-preview-shared-build branch August 14, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants