Skip to content

chore(lint): disable MD026 (trailing punctuation in heading) and MD06… #120

chore(lint): disable MD026 (trailing punctuation in heading) and MD06…

chore(lint): disable MD026 (trailing punctuation in heading) and MD06… #120

Workflow file for this run

name: 🚀 CI Pipeline
# Kapan workflow ini berjalan:
# - Setiap push ke branch utama
# - Setiap pull_request yang menyasar main atau pr/*
on:
push:
branches:
- main
- 'dev' # Branch integrasi utama (langsung, bukan dev/xxx)
- 'dev/**' # Branch integrasi spesifik (dev/berita-filter, dll.)
- 'be/**'
- 'fe/**'
- 'hotfix/**' # Branch perbaikan darurat
pull_request:
branches:
- main
- 'dev' # PR yang menyasar branch dev
- 'dev/**' # PR yang menyasar branch dev/xxx
# Batalkan run lama jika ada push baru di branch yang sama
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
name: 🔍 Lint · TypeCheck · Build
runs-on: ubuntu-latest
env:
# Fallback ke nilai dummy agar prisma generate & build tidak gagal di CI
# Build tidak menyentuh DB karena semua page menggunakan force-dynamic
DATABASE_URL: ${{ secrets.DATABASE_URL || 'postgresql://ci:ci@localhost:5432/ci_db' }}
DIRECT_URL: ${{ secrets.DIRECT_URL || 'postgresql://ci:ci@localhost:5432/ci_db' }}
JWT_SECRET: ${{ secrets.JWT_SECRET || 'ci-jwt-secret-placeholder-64-chars-long-for-build-only-ok' }}
NEXT_PUBLIC_SITE_URL: ${{ secrets.NEXT_PUBLIC_SITE_URL || 'https://localhost:3000' }}
steps:
- name: 📥 Checkout kode
uses: actions/checkout@v4
- name: 🟢 Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: 📦 Install dependencies
run: npm ci
- name: 🗄️ Generate Prisma Client
run: npx prisma generate
- name: 🔍 Lint (ESLint)
run: npm run lint
- name: 🔷 TypeScript type check
run: npx tsc --noEmit
- name: 🏗️ Build Next.js
run: npm run build