Problem
netlify.toml currently carries a full build command that runs the
doctoolchain (Jekyll + Gradle + asciidoctor + …) on Netlify itself:
command = "jekyll build && cd ../../.. && \
./gradlew generateDocs && \
cp -r ./build/docs/html5/ src/docs/website/_site/documentation"
That couples our doc deployment to Netlify's build environment:
- Netlify's image must keep providing JDK + Ruby + the docToolchain
toolchain at versions we support; any upstream image change can
break us with no signal until the next push.
- We have no way to reproduce a Netlify build locally other than by
pushing to Netlify; debugging is painful.
- Every push triggers the same expensive doc build twice — once in
GH Actions for the gh-pages.yml flow, once on Netlify.
What we want
- One build, in GH Actions, with full visibility and reproducibility.
main continues to deploy to GitHub Pages (current behaviour).
- Feature/bugfix branches and pull requests get a Netlify preview
URL automatically, posted as a PR comment so reviewers can click
through without checking out.
How
- Strip the
[build] command out of netlify.toml. Keep only the
publish directory + any redirects/functions. Netlify becomes a
pure hosting target.
- Extend the existing GH Actions docs workflow so that, once it has
produced the rendered site:
- If the ref is
main → deploy to GitHub Pages (today's path).
- Otherwise (feature/, bugfix/, pull_request) → upload the
artifact via a pinned-SHA Netlify deploy action, capture the
preview URL, post it as a PR comment when applicable.
- Pin the Netlify deploy action to a commit SHA per
githubactions:S7637.
Acceptance criteria
Problem
netlify.tomlcurrently carries a full build command that runs thedoctoolchain (Jekyll + Gradle + asciidoctor + …) on Netlify itself:
That couples our doc deployment to Netlify's build environment:
toolchain at versions we support; any upstream image change can
break us with no signal until the next push.
pushing to Netlify; debugging is painful.
GH Actions for the
gh-pages.ymlflow, once on Netlify.What we want
maincontinues to deploy to GitHub Pages (current behaviour).URL automatically, posted as a PR comment so reviewers can click
through without checking out.
How
[build] commandout ofnetlify.toml. Keep only thepublish directory + any redirects/functions. Netlify becomes a
pure hosting target.
produced the rendered site:
main→ deploy to GitHub Pages (today's path).artifact via a pinned-SHA Netlify deploy action, capture the
preview URL, post it as a PR comment when applicable.
githubactions:S7637.Acceptance criteria
netlify.tomlno longer contains a[build] command.maincontinues to update the GitHub Pages sitewith no behavioural change.
feature/*orbugfix/*branch publishes aNetlify preview at a stable per-branch URL.