fix: preserve pnpm symlinks in standalone zip for Azure deployment
Use zip -y to preserve symlinks in the standalone output. Azure Linux App Service mounts the zip via SquashFS which supports symlinks. This keeps the pnpm .pnpm/ structure intact so next can resolve peer deps like @swc/helpers and @next/env from their co-located positions. Also re-add node-linker=hoisted to .npmrc per pnpm docs recommendation for environments that need standard node_modules resolution.
This commit is contained in:
parent
ae9e3011e7
commit
3f7baf9ab3
2 changed files with 10 additions and 10 deletions
19
.github/workflows/deploy_cfwebapp_to_azure.yml
vendored
19
.github/workflows/deploy_cfwebapp_to_azure.yml
vendored
|
|
@ -71,21 +71,20 @@ jobs:
|
|||
working-directory: js
|
||||
run: |
|
||||
pnpm --filter codeflash-webapp build
|
||||
# Next.js standalone output traces runtime deps into .next/standalone/.
|
||||
# outputFileTracingRoot is set to the workspace root (js/), so the
|
||||
# layout is: standalone/{cf-webapp/,node_modules/,common/}.
|
||||
# Dereference pnpm symlinks (cp -rL) so the zip is self-contained,
|
||||
# then add static assets that standalone doesn't include.
|
||||
cp -rL cf-webapp/.next/standalone deploy-output
|
||||
cp -r cf-webapp/.next/static deploy-output/cf-webapp/.next/static
|
||||
cp -r cf-webapp/public deploy-output/cf-webapp/public
|
||||
cd deploy-output && zip -qr cfwebapp.zip .
|
||||
# Next.js standalone output traces only runtime deps into
|
||||
# .next/standalone/. outputFileTracingRoot is the workspace root,
|
||||
# so the layout mirrors the monorepo: cf-webapp/, node_modules/, common/.
|
||||
# Use zip -y to preserve pnpm symlinks — Azure Linux SquashFS supports them.
|
||||
# Then add static assets that standalone doesn't include.
|
||||
cp -r cf-webapp/.next/static cf-webapp/.next/standalone/cf-webapp/.next/static
|
||||
cp -r cf-webapp/public cf-webapp/.next/standalone/cf-webapp/public
|
||||
cd cf-webapp/.next/standalone && zip -qry cfwebapp.zip .
|
||||
|
||||
- name: Upload artifact for deployment jobs
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: cfwebapp-artifact
|
||||
path: js/deploy-output/cfwebapp.zip
|
||||
path: js/cf-webapp/.next/standalone/cfwebapp.zip
|
||||
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
@codeflash-ai:registry=https://npm.pkg.github.com
|
||||
node-linker=hoisted
|
||||
|
|
|
|||
Loading…
Reference in a new issue