Install Netlify CLI from the lockfile in deploy jobs instead of an uncached global npm install
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github-actions
- Domain
- ci-cd
Research direction
Read .github/workflows/ci.yml and compare the build, deploy-preview, and deploy-production jobs. Replace the global Netlify CLI install and cache with the lockfile-based install, then check that the env-var and deploy steps invoke the local CLI. Done when both deploy jobs use the pinned CLI and no global Netlify install or related cache remains.
Written by the indexing model from the issue text.
Description
Summary
Install Netlify CLI in the deploy jobs from the lockfile-pinned devDependency instead of npm install -g netlify-cli, and remove the ~/.npm cache step, which doesn't do its job.
Affected files / area
.github/workflows/ci.yml:deploy-previewanddeploy-productionjobs (steps "Cache npm global packages", "Install Netlify CLI", and thenetlifycalls after them)
Proposed approach
"Install Netlify CLI" takes 36s in deploy-preview (run 46856330159), and the same step runs in deploy-production. The existing cache doesn't help it:
- The key
npm-global-${{ runner.os }}-netlify-clinever changes.actions/cachenever overwrites an existing key, so the cache was saved once and is now frozen. npm install -g netlify-cliisn't pinned, so it resolves the latest release on every run, and less of it matches the frozen cache over time. Deploys can also pick up a new CLI version unannounced.
netlify-cli is already a devDependency, pinned in pnpm-lock.yaml at 24.3.0. The build job's pnpm install --ignore-scripts, which includes it, takes about 8s without any cache. So:
- In both deploy jobs, replace "Cache npm global packages" and "Install Netlify CLI" with the same install the
buildjob uses:npm install -g pnpm && pnpm install --ignore-scripts. - Call the CLI with
pnpm exec netlify …(or addnode_modules/.bintoPATH) in "Set Netlify Env Vars" / "Set Netlify Env Var for Production" and "Deploy to Netlify". - Optional: cache the pnpm store keyed on
hashFiles('pnpm-lock.yaml')(e.g.pnpm/action-setupfollowed byactions/setup-nodewithcache: pnpm) to save a few more seconds.
Side effect: deploys will use the lockfile's Netlify CLI version rather than the latest. That is intended: it makes deploys reproducible, and the CLI gets bumped like any other dependency.
Acceptance criteria / verification
- The CLI install step in
deploy-previewtakes ~10s or less instead of ~36s -
deploy-previewstill sets the env vars, deploys, and posts the preview link comment on a PR -
deploy-productionuses the same install, checked by reading the diff; it only runs on push tomain - No
npm install -g netlify-cliornpm-global-*-netlify-clicache remains in the workflows - Pre-commit hooks pass
Dependencies
None.
Generated by Claude Code
- Dominant language
- HTML
- Stars
- 0
- Forks
- 0
- Avg merge
- 48m
- Merged PRs (30d)
- 47
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from UkuleleTuesday/website
-
area:docs area:infra enhancement needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
UkuleleTuesday/website#315 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
UkuleleTuesday/website#301 ·
Maintainers usually reply within 1 day
-
area:seo enhancement needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
UkuleleTuesday/website#286 ·
Maintainers usually reply within 1 day
-
area:content enhancement needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 90/100
UkuleleTuesday/website#282 ·
Maintainers usually reply within 1 day
-
area:accessibility area:design enhancement needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
UkuleleTuesday/website#256 ·
Maintainers usually reply within 1 day
All issues in UkuleleTuesday/website
Similar issues
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
zeabur-oss/builder#304 ·
Maintainers usually reply within 1 day
-
ci severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
TMHSDigital/Spackle#205 ·
Maintainers usually reply within 1 day
-
sweep
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bketelsen/truenas-mcp#111 ·
Maintainers usually reply within 1 day
-
synchronizer Service annotations end up on every resource rendered after itPossibly taken @blacksoxx claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
kubescape/helm-charts#1061 ·
Maintainers usually reply within 1 day
-
area/tooling automation/health
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day