fix(deploy): déclencher après CI et vérifier le commit déployé
All checks were successful
CI / Lint, Test & Build (push) Successful in 12m13s

Le job deploy référençait needs:[ci] dans un autre workflow (inefficace
sur Gitea). Déclenchement via workflow_run après CI réussie, empreinte
GIT_COMMIT dans l'image, endpoint /api/build-info et health check sur
127.0.0.1:3000 avec comparaison du SHA attendu.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Antigravity
2026-05-17 09:59:33 +00:00
parent d4433bb5c1
commit 0e60c0e591
4 changed files with 53 additions and 15 deletions

View File

@@ -18,6 +18,7 @@ RUN npx prisma generate
# Stage 2: Build
# ===========================================================================
FROM node:22-bookworm-slim AS builder
ARG GIT_COMMIT=unknown
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -38,10 +39,12 @@ RUN npm run build
# Stage 3: Runner
# ===========================================================================
FROM node:22-bookworm-slim AS runner
ARG GIT_COMMIT=unknown
WORKDIR /app
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
ENV GIT_COMMIT=$GIT_COMMIT
RUN apt-get update && apt-get install -y --no-install-recommends \
openssl \

View File

@@ -0,0 +1,10 @@
import { NextResponse } from 'next/server'
export const dynamic = 'force-dynamic'
/** Public build fingerprint for deploy verification (no secrets). */
export async function GET() {
return NextResponse.json({
commit: process.env.GIT_COMMIT ?? 'unknown',
})
}