Skip to content

Commit f2975a0

Browse files
committed
fix ci
1 parent 969d805 commit f2975a0

File tree

4 files changed

+22
-14
lines changed

4 files changed

+22
-14
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

.github/workflows/publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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

.github/workflows/registry.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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: |

Dockerfile.service

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,31 @@
44
FROM node:22-alpine AS builder
55
WORKDIR /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

1215
COPY . .
13-
RUN npm run build
16+
RUN pnpm run build
1417

1518

1619
# 2) Runtime stage (Node + NGINX)
1720
FROM node:22-alpine AS runner
1821
WORKDIR /app
1922

23+
# Enable pnpm via corepack
24+
RUN corepack enable && corepack prepare pnpm@latest --activate
25+
2026
RUN apk add --no-cache nginx bash curl
2127

2228
# Copy built app and install prod deps only
2329
COPY --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
2834
COPY docker/nginx.conf /etc/nginx/nginx.conf

0 commit comments

Comments
 (0)