Compare commits

...

6 Commits

Author SHA1 Message Date
49abaaf2fd fix(web): increase build memory to 8GB and support smooth-scroll in IframeSection
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🏗️ Build (push) Successful in 16m45s
Build & Deploy / 🚀 Deploy (push) Successful in 19s
Build & Deploy / 🧪 QA (push) Successful in 1m9s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 3m9s
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-04-10 11:37:09 +02:00
7e9005e338 fix(web): remove forced transparent background from IframeSection to prevent visibility issues
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 9s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🏗️ Build (push) Failing after 37m43s
Build & Deploy / 🧪 QA (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 3s
Nightly QA / 🔗 Links & Deps (push) Successful in 4m13s
Nightly QA / 🎭 Lighthouse (push) Successful in 4m38s
Nightly QA / 🔍 Static Analysis (push) Successful in 4m55s
Nightly QA / 📝 E2E (push) Successful in 5m9s
Nightly QA / 🔔 Notify (push) Has been skipped
2026-04-09 23:09:38 +02:00
bbcc7d159c fix(deploy): resolve permission issues and stabilize asset build context
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🏗️ Build (push) Successful in 19m0s
Build & Deploy / 🚀 Deploy (push) Successful in 18s
Build & Deploy / 🧪 QA (push) Successful in 1m34s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 4m19s
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-04-09 22:26:57 +02:00
39f5bd3986 fix(blog): force dynamic rendering to avoid empty build-time cache
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 10s
Build & Deploy / 🏗️ Build (push) Successful in 13m5s
Build & Deploy / 🚀 Deploy (push) Successful in 18s
Build & Deploy / 🧪 QA (push) Successful in 1m8s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 3m8s
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-04-09 21:37:35 +02:00
944d369d43 ci: automate S3 cache purge during deployment
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🏗️ Build (push) Successful in 10m13s
Build & Deploy / 🚀 Deploy (push) Successful in 18s
Build & Deploy / 🧪 QA (push) Successful in 1m9s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 2m59s
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-04-09 18:18:34 +02:00
6aaf8ac44f fix(types): manually align Inquiry type for contact form fields
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 9s
Build & Deploy / 🏗️ Build (push) Successful in 17m53s
Build & Deploy / 🚀 Deploy (push) Successful in 15s
Build & Deploy / 🧪 QA (push) Successful in 1m9s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 3m8s
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-04-09 12:34:56 +02:00
9 changed files with 89 additions and 6 deletions

View File

@@ -316,6 +316,7 @@ jobs:
S3_BUCKET=${{ secrets.S3_BUCKET || vars.S3_BUCKET || 'mintel' }}
S3_REGION=${{ secrets.S3_REGION || vars.S3_REGION || 'fsn1' }}
S3_PREFIX=${{ secrets.S3_PREFIX || vars.S3_PREFIX || 'mintel.me' }}
BUILD_ID=${{ github.sha }}
tags: registry.infra.mintel.me/mintel/mintel.me:${{ needs.prepare.outputs.image_tag }}
cache-from: type=registry,ref=registry.infra.mintel.me/mintel/mintel.me:buildcache-${{ needs.prepare.outputs.target }}
cache-to: type=registry,ref=registry.infra.mintel.me/mintel/mintel.me:buildcache-${{ needs.prepare.outputs.target }},mode=max
@@ -532,6 +533,29 @@ jobs:
docker compose -p '${{ needs.prepare.outputs.project_name }}' --env-file $ENV_FILE up -d --remove-orphans
"
- name: 🧹 Purge S3 Cache
shell: bash
run: |
echo "Installing rclone..."
curl -s -O https://downloads.rclone.org/rclone-current-linux-amd64.deb
sudo dpkg -i rclone-current-linux-amd64.deb > /dev/null 2>&1
echo "Configuring rclone..."
cat > rclone.conf <<EOF
[mintel-s3]
type = s3
provider = Other
access_key_id = ${{ secrets.S3_ACCESS_KEY || vars.S3_ACCESS_KEY }}
secret_access_key = ${{ secrets.S3_SECRET_KEY || vars.S3_SECRET_KEY }}
endpoint = ${{ secrets.S3_ENDPOINT || vars.S3_ENDPOINT || 'https://fsn1.your-objectstorage.com' }}
region = ${{ secrets.S3_REGION || vars.S3_REGION || 'fsn1' }}
EOF
echo "Purging S3 cache for ${{ env.S3_PREFIX }} ..."
rclone --config rclone.conf delete mintel-s3:${{ env.S3_BUCKET }}/${{ env.S3_PREFIX }}/cache/ --include "*" || true
rm rclone.conf rclone-current-linux-amd64.deb
- name: 🧹 Post-Deploy Cleanup (Runner)
if: always()
run: docker builder prune -f --filter "until=1h"

View File

@@ -13,6 +13,7 @@ ARG S3_SECRET_KEY
ARG S3_BUCKET
ARG S3_REGION
ARG S3_PREFIX
ARG BUILD_ID
# Environment variables for Next.js build
ENV NEXT_PUBLIC_BASE_URL=$NEXT_PUBLIC_BASE_URL
@@ -47,10 +48,14 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
rm .npmrc
# Copy source code
# We use BUILD_ID here to ensure that if the commit changes, we always COPY the latest files
# even if Docker's metadata-based fingerprinting for the public directory fails.
ARG BUILD_ID
RUN echo "Building with ID: ${BUILD_ID}"
COPY . .
# Build application (monorepo filter)
ENV NODE_OPTIONS="--max_old_space_size=4096"
ENV NODE_OPTIONS="--max_old_space_size=8192"
RUN pnpm --filter @mintel/web build
# Stage 2: Runner
@@ -65,6 +70,13 @@ COPY --from=builder /app/apps/web/.next/static ./apps/web/.next/static
# Explicitly copy Payload dynamically generated importMap.js excluded by Standalone tracing
COPY --from=builder /app/apps/web/app/(payload)/admin/importMap.js ./apps/web/app/(payload)/admin/importMap.js
# Fix permissions for the non-root user (Standard uid/gid from base image)
# We do this as root before switching users
USER root
RUN chown -R 1001:65533 /app
USER nextjs
# Start from the app directory to ensure references solve correctly
WORKDIR /app/apps/web
CMD ["node", "server.js"]

View File

@@ -1,7 +1,7 @@
FROM node:20-alpine
# Install essential build tools if needed (e.g., for node-gyp)
RUN apk add --no-cache libc6-compat python3 make g++
RUN apk add --no-cache libc6-compat git python3 make g++
WORKDIR /app

View File

@@ -2,6 +2,8 @@ import { getAllPosts } from "@/src/lib/posts";
import { BlogClient } from "@/src/components/blog/BlogClient";
import type { Metadata } from "next";
export const dynamic = "force-dynamic";
export const metadata: Metadata = {
title: "Blog | Mintel.me",
description:

View File

@@ -287,6 +287,9 @@ export interface Inquiry {
email: string;
companyName?: string | null;
projectType?: string | null;
phone?: string | null;
role?: string | null;
deadline?: string | null;
message?: string | null;
isFreeText?: boolean | null;
/**
@@ -808,7 +811,10 @@ export interface InquiriesSelect<T extends boolean = true> {
name?: T;
email?: T;
companyName?: T;
phone?: T;
role?: T;
projectType?: T;
deadline?: T;
message?: T;
isFreeText?: T;
config?: T;

View File

@@ -196,11 +196,13 @@ export const IframeSection: React.FC<IframeSectionProps> = ({
const updateScrollState = React.useCallback(() => {
try {
const win = iframeRef.current?.contentWindow;
const doc = iframeRef.current?.contentDocument?.documentElement;
if (doc) {
const atTop = doc.scrollTop <= 5;
if (doc && win) {
const scrollTop = doc.scrollTop || win.scrollY || 0;
const atTop = scrollTop <= 5;
const atBottom =
doc.scrollTop + doc.clientHeight >= doc.scrollHeight - 5;
scrollTop + doc.clientHeight >= doc.scrollHeight - 5;
const isScrollable = doc.scrollHeight > doc.clientHeight + 10;
setScrollState({ atTop, atBottom, isScrollable });
}
@@ -493,7 +495,6 @@ export const IframeSection: React.FC<IframeSectionProps> = ({
style.textContent = `
*::-webkit-scrollbar { display: none !important; }
* { -ms-overflow-style: none !important; scrollbar-width: none !important; }
body { background: transparent !important; }
`;
iframe.contentDocument.head.appendChild(style);
setTimeout(updateAmbilight, 600);

View File

@@ -31,6 +31,7 @@ services:
# - CI=true
- NPM_TOKEN=${NPM_TOKEN:-}
- DATABASE_URI=postgres://${postgres_DB_USER:-payload}:${postgres_DB_PASSWORD:-payload}@postgres-db:5432/${postgres_DB_NAME:-payload}
- QDRANT_URL=http://qdrant:6333
- PAYLOAD_SECRET=dev-secret
command: >
sh -c "pnpm install --no-frozen-lockfile && pnpm --filter @mintel/web dev"

36
scripts/visual_debug.mjs Normal file
View File

@@ -0,0 +1,36 @@
import puppeteer from 'puppeteer';
(async () => {
// Launch browser
const browser = await puppeteer.launch({ headless: true });
const page = await browser.newPage();
// Set viewport
await page.setViewport({ width: 1920, height: 1080 });
try {
console.log("Navigating to case study page...");
await page.goto('https://mintel.me/case-studies/klz-cables', { waitUntil: 'networkidle2' });
console.log("Waiting a bit for iframes to load...");
await new Promise(r => setTimeout(r, 5000));
// Let's get console logs from the page too
page.on('console', msg => console.log('PAGE LOG:', msg.text()));
console.log("Taking screenshot...");
await page.screenshot({ path: '/Users/marcmintel/Projects/mintel.me/screenshot_case_study.png', fullPage: true });
// Also take a screenshot of the actual showcase HTML page directly to compare
console.log("Navigating directly to showcase HTML...");
await page.goto('https://mintel.me/showcase/klz-cables.com/power-cables-medium-voltage-cables.html', { waitUntil: 'networkidle2' });
await new Promise(r => setTimeout(r, 3000));
await page.screenshot({ path: '/Users/marcmintel/Projects/mintel.me/screenshot_showcase.png', fullPage: true });
console.log("Done!");
} catch (e) {
console.error("Error:", e);
} finally {
await browser.close();
}
})();

1
wget_out.txt Normal file
View File

@@ -0,0 +1 @@
zsh:1: command not found: wget