fix: deploy
All checks were successful
Build & Deploy / 🔍 Prepare Environment (push) Successful in 5s
Build & Deploy / 🧪 QA (push) Successful in 3m49s
Build & Deploy / 🏗️ Build (push) Successful in 7m13s
Build & Deploy / 🚀 Deploy (push) Successful in 14s
Build & Deploy / 🔔 Notifications (push) Successful in 2s
Build & Deploy / ⚡ PageSpeed (push) Successful in 1m20s

This commit is contained in:
2026-02-09 11:48:28 +01:00
parent 98c3338296
commit f4ba861b4d

View File

@@ -1,19 +1,19 @@
import { import {
createMintelDirectusClient, createMintelDirectusClient,
ensureDirectusAuthenticated, ensureDirectusAuthenticated,
} from "@mintel/next-utils"; } from "@mintel/next-utils";
import { updateSettings } from "@directus/sdk"; import { updateSettings } from "@directus/sdk";
const client = createMintelDirectusClient(); const client = createMintelDirectusClient();
async function setupBranding() { async function setupBranding() {
const prjName = process.env.PROJECT_NAME || "Mintel.me"; const prjName = process.env.PROJECT_NAME || "Mintel.me";
const prjColor = process.env.PROJECT_COLOR || "#ff00ff"; const prjColor = process.env.PROJECT_COLOR || "#ff00ff";
console.log(`🎨 Refining Directus Branding for ${prjName}...`); console.log(`🎨 Refining Directus Branding for ${prjName}...`);
await ensureDirectusAuthenticated(client); await ensureDirectusAuthenticated(client);
const cssInjection = ` const cssInjection = `
<style> <style>
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');
@@ -40,34 +40,33 @@ async function setupBranding() {
</div> </div>
`; `;
try { try {
await client.request( await client.request(
updateSettings({ updateSettings({
project_name: prjName, project_name: prjName,
project_color: prjColor, project_color: prjColor,
public_note: cssInjection, public_note: cssInjection,
module_bar_background: "#00081a", module_bar_background: "#00081a",
theme_light_overrides: { theme_light_overrides: {
primary: prjColor, primary: prjColor,
borderRadius: "12px", borderRadius: "12px",
navigationBackground: "#000c24", navigationBackground: "#000c24",
navigationForeground: "#ffffff", navigationForeground: "#ffffff",
moduleBarBackground: "#00081a", moduleBarBackground: "#00081a",
}, },
// eslint-disable-next-line @typescript-eslint/no-explicit-any } as any),
} as any), );
); console.log("✨ Branding applied!");
console.log("✨ Branding applied!"); } catch (error) {
} catch (error) { console.error("❌ Error during bootstrap:", error);
console.error("❌ Error during bootstrap:", error); }
}
} }
setupBranding() setupBranding()
.then(() => { .then(() => {
process.exit(0); process.exit(0);
}) })
.catch((err) => { .catch((err) => {
console.error("🚨 Fatal bootstrap error:", err); console.error("🚨 Fatal bootstrap error:", err);
process.exit(1); process.exit(1);
}); });