fix(ci): fix build-time nodemailer connection error and next.config warning
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🏗️ Build (push) Successful in 9m9s
Build & Deploy / 🚀 Deploy (push) Successful in 22s
Build & Deploy / 🩺 Smoke Test (push) Failing after 3s
Build & Deploy / 🔔 Notify (push) Successful in 2s

This commit is contained in:
2026-04-13 12:29:52 +02:00
parent f3cbdd8076
commit 9013d38e31
2 changed files with 25 additions and 15 deletions

View File

@@ -54,4 +54,11 @@ const withMDX = createMDX({});
// Clean, standard wrapper application // Clean, standard wrapper application
// Rewrites are now handled by src/middleware.ts for maximum robustness // Rewrites are now handled by src/middleware.ts for maximum robustness
export default withPayload(withMintelConfig(withMDX(nextConfig))); const config = withMintelConfig(withMDX(nextConfig));
// Cleanup config to prevent Next.js 16 warnings about deprecated keys
if (config.serverActions) {
delete config.serverActions;
}
export default withPayload(config);

View File

@@ -28,7 +28,8 @@ const dirname = path.dirname(filename);
const isCLI = const isCLI =
process.argv.includes("migrate") || process.argv.includes("migrate") ||
process.argv.includes("generate:importmap"); process.argv.includes("generate:importmap") ||
process.argv.includes("build");
let aiPlugin: any; let aiPlugin: any;
if (!isCLI) { if (!isCLI) {
const { payloadChatPlugin } = await import("@mintel/payload-ai"); const { payloadChatPlugin } = await import("@mintel/payload-ai");
@@ -67,19 +68,21 @@ export default buildConfig({
globals: [ globals: [
/* AiSettings as any */ /* AiSettings as any */
], ],
email: nodemailerAdapter({ email: isCLI
defaultFromAddress: process.env.MAIL_FROM || "info@mintel.me", ? undefined
defaultFromName: "Mintel.me", : nodemailerAdapter({
transportOptions: { defaultFromAddress: process.env.MAIL_FROM || "info@mintel.me",
host: process.env.MAIL_HOST || "localhost", defaultFromName: "Mintel.me",
port: parseInt(process.env.MAIL_PORT || "587", 10), transportOptions: {
auth: { host: process.env.MAIL_HOST || "localhost",
user: process.env.MAIL_USERNAME || "user", port: parseInt(process.env.MAIL_PORT || "587", 10),
pass: process.env.MAIL_PASSWORD || "pass", auth: {
}, user: process.env.MAIL_USERNAME || "user",
...(process.env.MAIL_HOST ? {} : { ignoreTLS: true }), pass: process.env.MAIL_PASSWORD || "pass",
}, },
}), ...(process.env.MAIL_HOST ? {} : { ignoreTLS: true }),
},
}),
editor: lexicalEditor({ editor: lexicalEditor({
features: ({ defaultFeatures }) => [ features: ({ defaultFeatures }) => [
...defaultFeatures, ...defaultFeatures,