Skip to content

Commit 1224e69

Browse files
committed
fix: ci
1 parent be9fed1 commit 1224e69

3 files changed

Lines changed: 14 additions & 9 deletions

File tree

Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
FROM node:25.8.0
2-
ADD . /app
1+
FROM node:25.8.0 AS build
32
WORKDIR /app
4-
RUN corepack enable && \
5-
pnpm install --frozen-lockfile && \
6-
pnpm build
3+
4+
COPY package.json pnpm-lock.yaml ./
5+
RUN npm install -g "$(node -p \"require('./package.json').packageManager\")" && \
6+
pnpm install --frozen-lockfile
7+
8+
COPY . .
9+
RUN pnpm build
710

811
FROM nginx:1.15.9
912
COPY nginx-site.conf /etc/nginx/conf.d/default.conf
10-
COPY --from=0 /app/dist /www
13+
COPY --from=build /app/dist /www

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Build
44

55
```bash
6-
corepack enable
6+
npm install -g pnpm@10.31.0
77
pnpm install
88
pnpm build
99
```

scripts/update.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22
set -e
3+
4+
PNPM_PACKAGE=$(node -p "require('./package.json').packageManager")
35
echo "Installing packages ..."
4-
docker run -it --rm -v `pwd`:/app -v pnpmstore:/pnpm/store -w /app node:lts sh -lc "corepack enable && pnpm install --frozen-lockfile --store-dir /pnpm/store"
6+
docker run -it --rm -v `pwd`:/app -v pnpmstore:/pnpm/store -w /app node:lts sh -lc "npm install -g '$PNPM_PACKAGE' && pnpm install --frozen-lockfile --store-dir /pnpm/store"
57
echo "Buliding ..."
6-
docker run -it --rm -v `pwd`:/app -v pnpmstore:/pnpm/store -w /app node:lts sh -lc "corepack enable && pnpm --store-dir /pnpm/store build"
8+
docker run -it --rm -v `pwd`:/app -v pnpmstore:/pnpm/store -w /app node:lts sh -lc "npm install -g '$PNPM_PACKAGE' && pnpm --store-dir /pnpm/store build"

0 commit comments

Comments
 (0)