DEPLOY: rebuild frontend before publishing host artifact #14
@@ -22,6 +22,26 @@ jobs:
|
||||
with:
|
||||
dotnet-version: '10.0.x'
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: pnpm
|
||||
cache-dependency-path: frontend/pnpm-lock.yaml
|
||||
|
||||
- name: Build frontend into Host static assets
|
||||
run: |
|
||||
pnpm install --frozen-lockfile
|
||||
VITE_APP_VERSION="${GITHUB_SHA::7}" pnpm build
|
||||
grep -R -q 'app-version' dist
|
||||
grep -R -q 'UI contract 4.0' dist
|
||||
find ../src/KArtSell.Host/wwwroot -mindepth 1 -delete
|
||||
cp -R dist/. ../src/KArtSell.Host/wwwroot/
|
||||
working-directory: frontend
|
||||
|
||||
- run: dotnet restore KArtSell.sln
|
||||
|
||||
- run: dotnet build KArtSell.sln --no-restore -c Release
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# 배포 frontend artifact 계약
|
||||
|
||||
## Source
|
||||
|
||||
- 운영 배포 Run 3357 로그: `dotnet publish` 전 frontend build 단계 없음
|
||||
- 운영 bundle에 `app-version` 및 `UI contract 4.0` marker 없음
|
||||
- `frontend`의 재현 가능한 `pnpm-lock.yaml` 및 기존 CI frontend job
|
||||
|
||||
## Decision
|
||||
|
||||
배포 workflow는 Host publish 전에 `pnpm install --frozen-lockfile`과 `VITE_APP_VERSION=${GITHUB_SHA::7} pnpm build`를 실행한다. 생성된 `frontend/dist`를 Host `wwwroot`에 복사하고, `app-version`과 `UI contract 4.0` marker가 없으면 배포를 중단한다.
|
||||
|
||||
## Evidence / Unknown
|
||||
|
||||
- Source 변경과 운영 artifact를 분리하지 않고, 매 배포 시 동일 commit에서 재생성한다.
|
||||
- 실제 운영 반영 증거는 이 Slice의 CI 및 deploy run 완료 후 보존한다.
|
||||
Reference in New Issue
Block a user