Skip to content

Commit 2da8cce

Browse files
committed
Update configuration for GitHub Pages deployment, including base path and asset prefix in next.config.ts. Enhance tsconfig.json for better type handling and include output directory. Add build verification step in deploy.yml to check build output.
1 parent e2b1353 commit 2da8cce

File tree

3 files changed

+29
-5
lines changed

3 files changed

+29
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ jobs:
3333

3434
- name: Build
3535
run: npm run build
36+
env:
37+
NODE_ENV: production
38+
39+
- name: Verify build output
40+
run: |
41+
echo "Build output contents:"
42+
ls -la ./out/
43+
echo "Index file:"
44+
cat ./out/index.html | head -20
3645
3746
- name: Setup Pages
3847
uses: actions/configure-pages@v4

next.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ const nextConfig: NextConfig = {
66
images: {
77
unoptimized: true
88
},
9-
// GitHub Pages typically serves from a subdirectory
9+
// GitHub Pages configuration
1010
basePath: process.env.NODE_ENV === 'production' ? '/open-superintelligence-lab-github-io' : '',
1111
assetPrefix: process.env.NODE_ENV === 'production' ? '/open-superintelligence-lab-github-io/' : '',
12+
distDir: 'out',
1213
};
1314

1415
export default nextConfig;

tsconfig.json

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"compilerOptions": {
33
"target": "ES2017",
4-
"lib": ["dom", "dom.iterable", "esnext"],
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
59
"allowJs": true,
610
"skipLibCheck": true,
711
"strict": true,
@@ -19,9 +23,19 @@
1923
}
2024
],
2125
"paths": {
22-
"@/*": ["./*"]
26+
"@/*": [
27+
"./*"
28+
]
2329
}
2430
},
25-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
26-
"exclude": ["node_modules"]
31+
"include": [
32+
"**/*.ts",
33+
"**/*.tsx",
34+
".next/types/**/*.ts",
35+
"next-env.d.ts",
36+
"out/types/**/*.ts"
37+
],
38+
"exclude": [
39+
"node_modules"
40+
]
2741
}

0 commit comments

Comments
 (0)