Skip to content

Commit 9ab1c48

Browse files
committed
Fixed config and updated build step
1 parent 006e9eb commit 9ab1c48

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/nextjs.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,16 @@ jobs:
3232
- name: Build static export
3333
run: |
3434
npm run build
35-
cp docs/index.html docs/404.html # SPA fallback
35+
OUT=docs
36+
# SPA fallback
37+
cp "$OUT/index.html" "$OUT/404.html" || true
38+
# RSC flight file for project pages
39+
if [ -f "$OUT/index.txt" ] && [ ! -f "$OUT/dupsugsite.txt" ]; then
40+
cp "$OUT/index.txt" "$OUT/dupsugsite.txt"
41+
fi
42+
43+
echo "Verify:"
44+
ls -l "$OUT"/index.txt "$OUT"/dupsugsite.txt || true
3645
3746
- name: Upload artifact
3847
uses: actions/upload-pages-artifact@v3

next.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const nextConfig = {
66
output: 'export',
77
distDir: "docs",
88
basePath: '/dupsugsite',
9-
assetPrefix: '.', // forces relative requests
9+
assetPrefix: '/dupsugsite/',
1010
images: { unoptimized: true }
1111
}
1212

0 commit comments

Comments
 (0)