ci: 同级检出 AuthCoreJS 以满足 file:../AuthCoreJS
pnpm 安装时会解析本地 path 依赖,单仓库检出时 ../AuthCoreJS 不存在导致 ENOENT。 与 monorepo 布局一致:huike-front/ 与 AuthCoreJS/ 并列;pnpm/nodejs cache 指向子目录 lockfile。 Made-with: Cursor
This commit is contained in:
@@ -13,8 +13,17 @@ jobs:
|
|||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
# `package.json` uses `@authcore/commons`: `file:../AuthCoreJS` — need sibling checkout like local monorepo.
|
||||||
|
- name: Checkout huike-front
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: huike-front
|
||||||
|
|
||||||
|
- name: Checkout AuthCoreJS
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: alchemy-studio/AuthCoreJS
|
||||||
|
path: AuthCoreJS
|
||||||
|
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
@@ -26,9 +35,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
|
cache-dependency-path: huike-front/pnpm-lock.yaml
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
working-directory: huike-front
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
working-directory: huike-front
|
||||||
run: pnpm run build
|
run: pnpm run build
|
||||||
|
|||||||
Reference in New Issue
Block a user