Просмотр исходного кода

ci(netlify): pin Node 22 and publish committed dist/

Every Netlify production deploy since rc7 (2026-03-10) has been failing
in state=error within ~28 seconds -- consistent with npm install bailing
out on Node version mismatch. The repo's GitHub Actions all use Node 22
but Netlify was using its default (older) Node, and there was no
.nvmrc / netlify.toml / engines field telling it otherwise.

Adds a minimal netlify.toml that:

- Pins NODE_VERSION = "22" so Netlify matches CI
- Skips npm install altogether by publishing the committed dist/ folder
  with a no-op command. This matches the maintainer's existing workflow
  (each release ends with a "chore: rebuild dist" commit), and makes
  deploys finish in seconds.

If future deploys want to build from source instead, the command can be
swapped to `npm ci && npm run docs-compile && npm run flatten-build`.
Aigars Silkalns 15 часов назад
Родитель
Сommit
d495d7569b
1 измененных файлов с 16 добавлено и 0 удалено
  1. 16 0
      netlify.toml

+ 16 - 0
netlify.toml

@@ -0,0 +1,16 @@
+# Netlify deploy configuration for adminlte-v4.netlify.app
+#
+# The dist/ folder is committed to the repo (see "rebuild dist" commits),
+# so the production deploy just publishes those static files. This avoids
+# running npm install on Netlify, which has been failing since rc7 due to
+# a Node version drift between Netlify's default and the Node 22 used in
+# CI (see .github/workflows/*).
+
+[build]
+  publish = "dist"
+  command = "echo 'Static deploy of committed dist/'"
+
+[build.environment]
+  # Match the Node version used in GitHub Actions so any future build
+  # command (eg. `npm run docs-compile`) resolves dependencies correctly.
+  NODE_VERSION = "22"