d661413a53
pnpm 安装时会解析本地 path 依赖,单仓库检出时 ../AuthCoreJS 不存在导致 ENOENT。 与 monorepo 布局一致:huike-front/ 与 AuthCoreJS/ 并列;pnpm/nodejs cache 指向子目录 lockfile。 Made-with: Cursor
47 lines
1.0 KiB
YAML
47 lines
1.0 KiB
YAML
name: Frontend CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
|
|
steps:
|
|
# `package.json` uses `@authcore/commons`: `file:../AuthCoreJS` — need sibling checkout like local monorepo.
|
|
- name: Checkout huike-front
|
|
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
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: pnpm
|
|
cache-dependency-path: huike-front/pnpm-lock.yaml
|
|
|
|
- name: Install dependencies
|
|
working-directory: huike-front
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build
|
|
working-directory: huike-front
|
|
run: pnpm run build
|