Compare commits
4 Commits
v1.16.2
...
fix/chunk-
| Author | SHA1 | Date | |
|---|---|---|---|
| ede34ab7ce | |||
| 3fac158185 | |||
| 001c8514b5 | |||
| 00a8e3248f |
@@ -158,22 +158,25 @@ jobs:
|
||||
run: |
|
||||
echo "Disk space before nuclear prune:"
|
||||
df -h
|
||||
|
||||
|
||||
# Massive cleanup of pre-installed runner software to free up ~5GB+
|
||||
# These are standard on VM-based runners and often unnecessary
|
||||
sudo rm -rf /usr/share/dotnet || true
|
||||
sudo rm -rf /usr/local/lib/android || true
|
||||
sudo rm -rf /opt/ghc || true
|
||||
sudo rm -rf /opt/hostedtoolcache/CodeQL || true
|
||||
|
||||
|
||||
# Comprehensive Docker purge
|
||||
docker buildx stop || true
|
||||
docker buildx rm -a || true
|
||||
docker rm -fv $(docker ps -aq --filter "ancestor=moby/buildkit") || true
|
||||
docker system prune -af --volumes
|
||||
docker builder prune -af
|
||||
docker buildx prune -af
|
||||
|
||||
|
||||
# Clean temp build artifacts
|
||||
rm -rf /tmp/docker-actions-toolkit-* || true
|
||||
|
||||
|
||||
echo "Disk space after nuclear prune:"
|
||||
df -h
|
||||
continue-on-error: true
|
||||
@@ -241,8 +244,6 @@ jobs:
|
||||
DIRECTUS_URL: ${{ needs.prepare.outputs.directus_url }}
|
||||
DIRECTUS_HOST: cms.${{ needs.prepare.outputs.traefik_host }}
|
||||
|
||||
|
||||
|
||||
# Mail
|
||||
MAIL_HOST: ${{ secrets.SMTP_HOST || vars.SMTP_HOST }}
|
||||
MAIL_PORT: ${{ secrets.SMTP_PORT || vars.SMTP_PORT || '587' }}
|
||||
@@ -427,7 +428,7 @@ jobs:
|
||||
|
||||
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)
|
||||
@@ -453,7 +454,7 @@ jobs:
|
||||
COUNT=0
|
||||
MAX=24
|
||||
URL="${{ needs.prepare.outputs.next_public_url }}"
|
||||
|
||||
|
||||
echo "Verifying $URL is responsive..."
|
||||
while [ $COUNT -lt $MAX ]; do
|
||||
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$URL/" || echo "000")
|
||||
@@ -465,7 +466,7 @@ jobs:
|
||||
sleep 5
|
||||
COUNT=$((COUNT + 1))
|
||||
done
|
||||
|
||||
|
||||
if [ "$STATUS" != "200" ]; then
|
||||
echo "❌ Site failed smoke test after 2 minutes! (Status: $STATUS)"
|
||||
exit 1
|
||||
@@ -475,7 +476,7 @@ jobs:
|
||||
shell: sh
|
||||
run: |
|
||||
BASE_URL="${{ needs.prepare.outputs.next_public_url }}"
|
||||
|
||||
|
||||
echo "Verifying case study page..."
|
||||
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$BASE_URL/case-studies/klz-cables")
|
||||
if [ "$STATUS" != "200" ]; then
|
||||
@@ -483,7 +484,7 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
echo "✅ Case study page UP"
|
||||
|
||||
|
||||
echo "Verifying breeze CSS (root path)..."
|
||||
CSS_PATH="/assets/klz-cables.com/wp-content/cache/breeze-minification/css/breeze_klz-cables-com-1-10895.css"
|
||||
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$BASE_URL$CSS_PATH")
|
||||
@@ -492,7 +493,7 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
echo "✅ Root asset path OK"
|
||||
|
||||
|
||||
echo "Verifying breeze CSS (relative path from case-study)..."
|
||||
REL_CSS_PATH="/case-studies/assets/klz-cables.com/wp-content/cache/breeze-minification/css/breeze_klz-cables-com-1-10895.css"
|
||||
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$BASE_URL$REL_CSS_PATH")
|
||||
|
||||
@@ -15,6 +15,22 @@ export default function Error({
|
||||
// Log the error to Sentry/GlitchTip
|
||||
Sentry.captureException(error);
|
||||
console.error("Caught in error.tsx:", error);
|
||||
|
||||
// Auto-reload on ChunkLoadError or Server Action errors to fetch the new deployment assets
|
||||
const isChunkLoadError =
|
||||
error.message &&
|
||||
(error.message.includes("ChunkLoadError") ||
|
||||
error.message.includes("Loading chunk") ||
|
||||
error.message.includes("Failed to find Server Action"));
|
||||
|
||||
if (isChunkLoadError) {
|
||||
const lastReload = sessionStorage.getItem("last-chunk-reload");
|
||||
const now = Date.now();
|
||||
if (!lastReload || now - parseInt(lastReload) > 10000) {
|
||||
sessionStorage.setItem("last-chunk-reload", now.toString());
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
}, [error]);
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
import Error from "next/error";
|
||||
import { useEffect } from "react";
|
||||
import { Inter, Newsreader } from "next/font/google";
|
||||
import "./globals.css";
|
||||
@@ -23,6 +22,22 @@ export default function GlobalError({
|
||||
}) {
|
||||
useEffect(() => {
|
||||
Sentry.captureException(error);
|
||||
|
||||
// Auto-reload on ChunkLoadError or Server Action errors to fetch the new deployment assets
|
||||
const isChunkLoadError =
|
||||
error.message &&
|
||||
(error.message.includes("ChunkLoadError") ||
|
||||
error.message.includes("Loading chunk") ||
|
||||
error.message.includes("Failed to find Server Action"));
|
||||
|
||||
if (isChunkLoadError) {
|
||||
const lastReload = sessionStorage.getItem("last-chunk-reload");
|
||||
const now = Date.now();
|
||||
if (!lastReload || now - parseInt(lastReload) > 10000) {
|
||||
sessionStorage.setItem("last-chunk-reload", now.toString());
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
}, [error]);
|
||||
|
||||
return (
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import * as React from "react";
|
||||
import { useState, useMemo, useEffect, useRef } from "react";
|
||||
import { motion } from "framer-motion";
|
||||
import * as confetti from "canvas-confetti";
|
||||
import confetti from "canvas-confetti";
|
||||
import {
|
||||
Layers,
|
||||
BrainCircuit,
|
||||
|
||||
Reference in New Issue
Block a user