Repository navigation
ci: run gulp bundle on Node 20 - #53
Conversation
PostCSS 8.1 and gulp-stylelint 13 still use the ./ package-exports fallback. Node 17+ removed that, so lint:css crashed on GitHub's Node 20. Pin CI to Node 16 so the bundle job can finish.
Node 16 got CI past the PostCSS crash. gulp bundle still failed lint:css on duplicate selectors and formatting in the Savanna theme. Merge those rules and keep Arial as a font name.
gulp-stylelint 13 cannot load PostCSS internals on Node 17+. Run stylelint 14 directly so CI can stay on Node 20. Keep the old CSS naming rules so existing stylesheets do not need a rewrite.
|
@Tushar-TG-14 Please review |
checkout, setup-node, and upload-artifact v4 still target Node 20 on the runner, which GitHub now warns about. Bump those actions to v5. gulp still uses Node 20 from .nvmrc.
v5 still declares Node 20 on the runner, which is why the warning remained after the v5 bump. v6 is the release that runs on Node 24 by default.
|
|
The push-to-main step failed on every merge: it rebuilt build/ui-bundle.zip and pushed it straight to main as github-actions[bot], which the branch protection on main rejects (require a pull request, and require the build check that a direct push can never have). See the failed run on the #53 merge. Instead of fighting protection with tokens or a bot bypass, drop the auto-commit entirely. Contributors rebuild the bundle locally with `npx gulp bundle` and commit build/ui-bundle.zip in their PR, so it rides in through the normal reviewed, checked path like any other change. CI now only: - on PRs: runs `npx gulp bundle` (lint + build) as the required `build` check, - on merge to main: pings Netlify so docs sites pull the committed bundle. No bot pushes to main, so no more protected-branch failures, no binary commits created by CI, and no token or org-ruleset change needed. Permissions drop to contents: read. The consumer URL (blob/main/build/ui-bundle.zip) is unchanged.
Why
#52 made CI run
gulp bundle. That failed on Node 20 because gulp-stylelint 13 / postcss-syntax still importpostcss/lib/input. Node 17+ no longer allows that.Pinning Node 16 worked around it, then lint showed real issues in
theme-cloud.css. We can stay on Node 20 instead.Fix
.nvmrcuse Node 20theme-cloud.cssformatting/duplicate-selector fixes so lint can passDocs sites are unchanged. They still consume the zip, not Node.
Test plan
npx gulp bundlepasses lint:css and writes the zip artifactmaincan publish the zip and ping Netlify once