@@ -23,24 +23,31 @@ jobs:
2323 with :
2424 node-version : " 20"
2525 cache : " npm"
26- cache-dependency-path : packages/web/ package-lock.json
26+ cache-dependency-path : package-lock.json
2727
2828 - name : Install dependencies
29- run : cd packages/web && npm install
29+ run : npm ci --workspace packages/web
3030
3131 - name : Build Next.js (standalone)
32- run : cd packages/web && npm run build
32+ run : npm run build --workspace packages/web
3333 env :
3434 NEXT_PUBLIC_REPOWISE_API_URL : " "
3535
3636 - name : Package standalone output
3737 run : |
38- cd packages/web/.next/standalone
39- # Copy static files into standalone (Next.js requirement)
40- cp -r ../../.next/static .next/static
41- [ -d ../../public ] && cp -r ../../public public || true
38+ STANDALONE=packages/web/.next/standalone
39+ # Copy static assets into standalone (Next.js requirement)
40+ cp -r packages/web/.next/static $STANDALONE/packages/web/.next/static
41+ [ -d packages/web/public ] && cp -r packages/web/public $STANDALONE/packages/web/public || true
42+ # Flatten: move the nested server into a clean directory
43+ mkdir -p /tmp/repowise-web
44+ cp $STANDALONE/packages/web/server.js /tmp/repowise-web/
45+ cp -r $STANDALONE/packages/web/.next /tmp/repowise-web/.next
46+ [ -d $STANDALONE/packages/web/public ] && cp -r $STANDALONE/packages/web/public /tmp/repowise-web/public || true
47+ cp -r $STANDALONE/node_modules /tmp/repowise-web/node_modules 2>/dev/null || true
48+ [ -d $STANDALONE/packages/web/node_modules ] && cp -r $STANDALONE/packages/web/node_modules/* /tmp/repowise-web/node_modules/ 2>/dev/null || true
4249 # Create tarball
43- tar -czf /tmp/repowise-web.tar.gz .
50+ cd /tmp/repowise-web && tar -czf /tmp/repowise-web.tar.gz .
4451
4552 - name : Upload web artifact
4653 uses : actions/upload-artifact@v4
0 commit comments