chore(repo): remove theoretical workflow and fix prisma ci generation
Some checks failed
CMS CI / Governance Checks (push) Successful in 1m6s
CMS CI / Lint Typecheck Unit E2E (push) Failing after 1m8s

This commit is contained in:
2026-02-11 18:26:42 +01:00
parent c174f840bc
commit a57464d818
8 changed files with 12 additions and 122 deletions

View File

@@ -1,113 +0,0 @@
name: CMS CI/CD (Theoretical)
on:
pull_request:
push:
branches:
- dev
- main
- staging
tags:
- "v*"
workflow_dispatch:
env:
BUN_VERSION: "1.3.5"
jobs:
quality:
name: Lint Typecheck Tests
runs-on: node22-bun
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Generate Prisma client
run: bun run db:generate
- name: Lint
run: bun run lint
- name: Typecheck
run: bun run typecheck
- name: Unit and component tests
run: bun run test
- name: E2E suite discovery check
run: bun run test:e2e --list
- name: Conventional commit check (latest commit)
run: bun run commitlint
build_staging_images:
name: Build Staging Images
runs-on: node22-bun
needs: quality
if: github.ref == 'refs/heads/staging'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build web image (staging)
run: docker build -f apps/web/Dockerfile -t cms-web:staging .
- name: Build admin image (staging)
run: docker build -f apps/admin/Dockerfile -t cms-admin:staging .
build_production_images:
name: Build Production Images
runs-on: node22-bun
needs: quality
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build web image (production)
run: docker build -f apps/web/Dockerfile -t cms-web:${{ github.ref_name }} .
- name: Build admin image (production)
run: docker build -f apps/admin/Dockerfile -t cms-admin:${{ github.ref_name }} .
- name: Generate changelog
run: |
bun install --frozen-lockfile
bun run changelog:release
- name: Push images (placeholder)
run: |
echo "TODO: docker login to registry"
echo "TODO: docker push cms-web:${{ github.ref_name }}"
echo "TODO: docker push cms-admin:${{ github.ref_name }}"
echo "TODO: publish CHANGELOG.md content as release notes"
deploy_staging:
name: Deploy Staging (Placeholder)
runs-on: node22-bun
needs: build_staging_images
if: github.ref == 'refs/heads/staging'
steps:
- name: Deploy placeholder
run: |
echo "TODO: Pull and restart staging compose on target host"
echo "docker compose -f docker-compose.staging.yml up -d"
deploy_production:
name: Deploy Production (Placeholder)
runs-on: node22-bun
needs: build_production_images
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Deploy placeholder
run: |
echo "TODO: Pull and restart production compose on target host"
echo "docker compose -f docker-compose.production.yml up -d"

View File

@@ -90,6 +90,9 @@ jobs:
- name: Lint and format checks - name: Lint and format checks
run: bun run check run: bun run check
- name: Generate Prisma client
run: bun run db:generate
- name: Typecheck - name: Typecheck
run: bun run typecheck run: bun run typecheck

View File

@@ -97,10 +97,11 @@ bunx playwright install
## Delivery Scaffolding ## Delivery Scaffolding
The repo includes a theoretical CI/CD and deployment baseline: The repo includes a CI/CD and deployment baseline:
- Gitea workflow: `.gitea/workflows/ci-cd-theoretical.yml` - Quality gate workflow: `.gitea/workflows/ci.yml`
- Real quality gate workflow: `.gitea/workflows/ci.yml` - Deployment workflow: `.gitea/workflows/deploy.yml`
- Release workflow: `.gitea/workflows/release.yml`
- App images: - App images:
- `apps/web/Dockerfile` - `apps/web/Dockerfile`
- `apps/admin/Dockerfile` - `apps/admin/Dockerfile`

View File

@@ -81,7 +81,7 @@ This file is the single source of truth for roadmap and delivery progress.
### Delivery Pipeline And Runtime ### Delivery Pipeline And Runtime
- [x] [P2] Theoretical Gitea Actions workflow scaffold (`.gitea/workflows/ci-cd-theoretical.yml`) - [x] [P2] Gitea workflow baseline (`.gitea/workflows/ci.yml`, `.gitea/workflows/deploy.yml`, `.gitea/workflows/release.yml`)
- [x] [P2] Bun-based Dockerfiles for public and admin apps - [x] [P2] Bun-based Dockerfiles for public and admin apps
- [x] [P2] Staging and production docker-compose templates - [x] [P2] Staging and production docker-compose templates
- [x] [P1] Registry credentials and image push strategy - [x] [P1] Registry credentials and image push strategy

View File

@@ -6,7 +6,7 @@ module.exports = {
"always", "always",
["feat", "fix", "refactor", "perf", "test", "docs", "build", "ci", "chore", "revert"], ["feat", "fix", "refactor", "perf", "test", "docs", "build", "ci", "chore", "revert"],
], ],
"scope-empty": [2, "never"], "scope-empty": [0],
"subject-empty": [2, "never"], "subject-empty": [2, "never"],
}, },
} }

View File

@@ -1,6 +1,5 @@
generator client { generator client {
provider = "prisma-client" provider = "prisma-client-js"
output = "./generated/client"
} }
datasource db { datasource db {

View File

@@ -1,6 +1,6 @@
import { PrismaPg } from "@prisma/adapter-pg" import { PrismaPg } from "@prisma/adapter-pg"
import { PrismaClient } from "@prisma/client"
import { Pool } from "pg" import { Pool } from "pg"
import { PrismaClient } from "../prisma/generated/client/client"
const connectionString = process.env.DATABASE_URL const connectionString = process.env.DATABASE_URL

View File

@@ -4,8 +4,8 @@ import {
type UpdatePostInput, type UpdatePostInput,
updatePostInputSchema, updatePostInputSchema,
} from "@cms/content" } from "@cms/content"
import type { Post } from "@prisma/client"
import { type CrudAuditHook, type CrudMutationContext, createCrudService } from "@cms/crud" import { type CrudAuditHook, type CrudMutationContext, createCrudService } from "@cms/crud"
import type { Post } from "../prisma/generated/client/client"
import { db } from "./client" import { db } from "./client"