File tree Expand file tree Collapse file tree 4 files changed +22
-14
lines changed
Expand file tree Collapse file tree 4 files changed +22
-14
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,10 @@ jobs:
1717 uses : actions/setup-node@v3
1818 with :
1919 node-version : ' 20.x'
20- cache : ' npm '
20+ cache : ' pnpm '
2121
2222 - name : Install dependencies
23- run : npm ci
23+ run : pnpm install
2424
2525 - name : Build
26- run : npm run build
26+ run : pnpm run build
Original file line number Diff line number Diff line change @@ -19,16 +19,17 @@ jobs:
1919 uses : actions/setup-node@v3
2020 with :
2121 node-version : ' 20.x'
22+ cache : ' pnpm'
2223 registry-url : ' https://registry.npmjs.org'
2324
2425 - name : Install dependencies
25- run : npm ci
26+ run : pnpm install --frozen-lockfile
2627
2728 - name : Build
28- run : npm run build
29+ run : pnpm run build
2930
3031 - name : Publish to NPM
31- run : npm publish --access public
32+ run : pnpm publish --access public
3233 env :
3334 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
3435
Original file line number Diff line number Diff line change @@ -19,12 +19,13 @@ jobs:
1919 uses : actions/setup-node@v3
2020 with :
2121 node-version : ' 20.x'
22+ cache : ' pnpm'
2223
2324 - name : Install dependencies
24- run : npm ci
25+ run : pnpm install --frozen-lockfile
2526
2627 - name : Build
27- run : npm run build
28+ run : pnpm run build
2829
2930 - name : Install MCP Publisher
3031 run : |
Original file line number Diff line number Diff line change 44FROM node:22-alpine AS builder
55WORKDIR /app
66
7- COPY package*.json ./
8- # Ensure dev dependencies (typescript, etc.) are installed for build, but skip scripts to avoid running
7+ # Enable pnpm via corepack
8+ RUN corepack enable && corepack prepare pnpm@latest --activate
9+
10+ COPY package.json pnpm-lock.yaml ./
11+ # Install dev dependencies for the build, but skip scripts to avoid running
912# the package "prepare" script before the source code is copied.
10- RUN npm ci --include =dev --ignore-scripts
13+ RUN pnpm install --frozen-lockfile --ignore-scripts
1114
1215COPY . .
13- RUN npm run build
16+ RUN pnpm run build
1417
1518
1619# 2) Runtime stage (Node + NGINX)
1720FROM node:22-alpine AS runner
1821WORKDIR /app
1922
23+ # Enable pnpm via corepack
24+ RUN corepack enable && corepack prepare pnpm@latest --activate
25+
2026RUN apk add --no-cache nginx bash curl
2127
2228# Copy built app and install prod deps only
2329COPY --from =builder /app/dist ./dist
24- COPY package* .json ./
25- RUN npm ci --omit =dev --ignore-scripts
30+ COPY package.json pnpm-lock.yaml ./
31+ RUN pnpm install --prod --frozen-lockfile --ignore-scripts
2632
2733# NGINX config and entrypoint
2834COPY docker/nginx.conf /etc/nginx/nginx.conf
You can’t perform that action at this time.
0 commit comments