mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-09-05 23:56:59 +08:00
fix(ci): 修复 GitHub Actions 构建错误
移除 setup-node 中的 pnpm 缓存配置以修复 macOS 构建失败,修改 Dockerfile 不再依赖 pnpm-lock.yaml 以修复 Docker 构建失败 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
3582e65dc5
commit
6d5d1ad373
@@ -59,13 +59,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: 'latest'
|
version: 'latest'
|
||||||
|
|
||||||
# 设置 Node 环境(带 pnpm 缓存)
|
# 设置 Node 环境
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
cache: 'pnpm'
|
|
||||||
cache-dependency-path: BillNote_frontend/pnpm-lock.yaml
|
|
||||||
|
|
||||||
- name: Install frontend dependencies
|
- name: Install frontend dependencies
|
||||||
working-directory: BillNote_frontend
|
working-directory: BillNote_frontend
|
||||||
|
|||||||
@@ -22,5 +22,4 @@ dist-ssr
|
|||||||
*.njsproj
|
*.njsproj
|
||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
/pnpm-lock.yaml
|
|
||||||
/src-tauri/bin/
|
/src-tauri/bin/
|
||||||
|
|||||||
+3
-3
@@ -31,9 +31,9 @@ RUN corepack enable && corepack prepare pnpm@latest --activate
|
|||||||
|
|
||||||
WORKDIR /tmp/frontend
|
WORKDIR /tmp/frontend
|
||||||
|
|
||||||
# 先复制 lockfile 利用依赖层缓存
|
# 先复制 package.json 利用依赖层缓存
|
||||||
COPY ./BillNote_frontend/package.json ./BillNote_frontend/pnpm-lock.yaml ./
|
COPY ./BillNote_frontend/package.json ./
|
||||||
RUN pnpm install --frozen-lockfile
|
RUN pnpm install
|
||||||
|
|
||||||
COPY ./BillNote_frontend /tmp/frontend
|
COPY ./BillNote_frontend /tmp/frontend
|
||||||
RUN pnpm run build
|
RUN pnpm run build
|
||||||
|
|||||||
Reference in New Issue
Block a user