fix: hoist pnpm deps and deploy to codeflash-webapp-main

Add node-linker=hoisted to .npmrc so pnpm hoists all dependencies like
npm. Update CI to rsync workspace-root node_modules into cf-webapp
before zipping, ensuring @next/env, @swc/helpers, and other peer deps
are included. Retarget deployment to the new codeflash-webapp-main app.
This commit is contained in:
Kevin Turcios 2026-04-15 07:04:41 -05:00
parent e2940da25f
commit ea60289699
2 changed files with 6 additions and 3 deletions

View file

@ -71,6 +71,9 @@ jobs:
working-directory: js working-directory: js
run: | run: |
pnpm --filter codeflash-webapp build pnpm --filter codeflash-webapp build
# pnpm hoists shared deps to the workspace root node_modules/.
# Merge them into cf-webapp/node_modules/ so the zip is self-contained.
rsync -a --ignore-existing node_modules/ cf-webapp/node_modules/
cd cf-webapp && zip -qr cfwebapp.zip . .next node_modules package.json public cd cf-webapp && zip -qr cfwebapp.zip . .next node_modules package.json public
- name: Upload artifact for deployment jobs - name: Upload artifact for deployment jobs
@ -104,12 +107,11 @@ jobs:
tenant-id: ${{ secrets.AZURE_TENANT_ID }} tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: "Deploy to Azure App Service - codeflash-webapp-2-staging.azurewebsites.net" - name: "Deploy to Azure App Service - codeflash-webapp-main"
uses: azure/webapps-deploy@v3 uses: azure/webapps-deploy@v3
id: deploy-to-webapp id: deploy-to-webapp
with: with:
app-name: "codeflash-webapp-2" app-name: "codeflash-webapp-main"
slot-name: "staging"
# if we deploy a zip we can do Run-From-Zip and skip the oryx build step (which fails if we do a regular zip-deploy because it thinks the project is php for some reason) # if we deploy a zip we can do Run-From-Zip and skip the oryx build step (which fails if we do a regular zip-deploy because it thinks the project is php for some reason)
# https://learn.microsoft.com/en-us/azure/app-service/deploy-run-package#enable-running-from-package # https://learn.microsoft.com/en-us/azure/app-service/deploy-run-package#enable-running-from-package
package: "cfwebapp.zip" package: "cfwebapp.zip"

View file

@ -1 +1,2 @@
@codeflash-ai:registry=https://npm.pkg.github.com @codeflash-ai:registry=https://npm.pkg.github.com
node-linker=hoisted