lawsynth/.github/workflows/regenerate-lockfile.yml
caelum0x c7e707e4bd fix(deploy): pin autoInstallPeers in pnpm-workspace.yaml + one-click lockfile regen
The .npmrc auto-install-peers=false didn't resolve the Cloudflare
ERR_PNPM_LOCKFILE_CONFIG_MISMATCH: pnpm 10 reads autoInstallPeers from
pnpm-workspace.yaml, so pin it there (the canonical location) to match the
lockfile's recorded `settings.autoInstallPeers: false`.

The lockfile is also stale (missing @types/node), which needs a networked
regeneration this offline repo can't do. Added a manual
`Regenerate pnpm lockfile` GitHub Action (workflow_dispatch): from the Actions
tab it runs `pnpm install --no-frozen-lockfile` on GitHub's network and commits
the fixed lockfile back — no local pnpm required. After it runs, Cloudflare's
frozen install passes.
2026-08-18 23:07:32 +03:00

37 lines
1.2 KiB
YAML

name: Regenerate pnpm lockfile
# One-click fix for a stale pnpm-lock.yaml (the committed one predates
# @types/node in @lawsynth/state-store, so --frozen-lockfile can't proceed on
# Cloudflare / CI). Run this from the Actions tab (Run workflow) — it regenerates
# the lockfile on GitHub's network using the repo's pinned pnpm config
# (autoInstallPeers=false) and commits it back to the branch. After it runs,
# Cloudflare's frozen install passes.
on:
workflow_dispatch:
permissions:
contents: write
jobs:
regenerate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- run: pnpm install --no-frozen-lockfile
- name: Commit the regenerated lockfile
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add pnpm-lock.yaml
if git diff --cached --quiet; then
echo "pnpm-lock.yaml already up to date"
else
git commit -m "chore: regenerate pnpm-lock.yaml"
git push
fi