Skip to content

ci: use npm ci for website checks - #19788

Open
FrankChen021 wants to merge 1 commit into
apache:masterfrom
FrankChen021:codex/use-npm-ci-for-website-checks
Open

ci: use npm ci for website checks#19788
FrankChen021 wants to merge 1 commit into
apache:masterfrom
FrankChen021:codex/use-npm-ci-for-website-checks

Conversation

@FrankChen021

Copy link
Copy Markdown
Member

What changed

Use npm ci instead of npm install when installing website dependencies in the web checks workflow.

Why

The repository commits website/package-lock.json, and Dependabot security updates can intentionally modify only that lockfile when updating a transitive dependency. npm install may reconcile or rewrite dependency resolution during CI, which means a passing build does not prove that the committed manifest and lockfile are consistent or that the exact locked dependency graph was tested.

npm ci fails when package.json and package-lock.json disagree, installs the exact committed dependency graph, and does not rewrite the lockfile. This makes website dependency checks reproducible while leaving the local development workflow unchanged; developers can continue to use npm install when adding or updating dependencies.

Validation

  • bash -n .github/scripts/web-checks.sh
  • cd website && npm ci
  • npm run build
  • npm run link-lint
  • npm run spellcheck

@github-actions github-actions Bot added the GHA label Jul 29, 2026
@FrankChen021
FrankChen021 marked this pull request as ready for review July 29, 2026 03:38
Copilot AI review requested due to automatic review settings July 29, 2026 03:38

Copilot AI 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.

Pull request overview

This PR updates the website dependency installation step used by CI web checks to be reproducible and to validate that the committed package-lock.json matches package.json.

Changes:

  • Switch website dependency installation from npm install to npm ci in the web checks script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants