Skip to content

Commit e00fa32

Browse files
Copilotmgierschdev
andcommitted
fix: resolve frontend build failures in CI
- Remove Google Fonts import that requires network access during build - Add system font stack fallback in globals.css - Fix case-sensitive reference to Board.svg file - Add NEXT_TELEMETRY_DISABLED to build step - Disable optimizeFonts in next.config.js All changes ensure the build works in CI environments without network access. Co-authored-by: mgierschdev <62764972+mgierschdev@users.noreply.github.com>
1 parent be454c1 commit e00fa32

4 files changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ jobs:
8080
npm test -- --passWithNoTests
8181
8282
- name: Build
83+
env:
84+
NEXT_TELEMETRY_DISABLED: 1
8385
run: |
8486
cd frontend
8587
npm run build

frontend/next.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
/** @type {import('next').NextConfig} */
2-
const nextConfig = {}
2+
const nextConfig = {
3+
// Disable font optimization to prevent build failures in CI
4+
optimizeFonts: false,
5+
}
36

47
module.exports = nextConfig

frontend/src/app/globals.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
box-sizing: border-box;
33
}
44

5+
body {
6+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
7+
}
8+
59
.main {
610
border: 2px solid aliceblue;
711
}
@@ -35,7 +39,7 @@
3539
}
3640

3741
.chessboard-grid {
38-
background-image: url('../../public/board.svg');
42+
background-image: url('../../public/Board.svg');
3943
background-repeat: no-repeat;
4044
background-size: cover;
4145
float: right;

frontend/src/app/layout.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
import './globals.css'
2-
import { Inter } from 'next/font/google'
3-
4-
const inter = Inter({ subsets: ['latin'] })
52

63
export const metadata = {
74
title: 'Chess',
@@ -15,7 +12,7 @@ export default function RootLayout({
1512
}) {
1613
return (
1714
<html lang="en">
18-
<body className={inter.className}>{children}</body>
15+
<body>{children}</body>
1916
</html>
2017
)
2118
}

0 commit comments

Comments
 (0)