Skip to content

Commit 53a0337

Browse files
committed
update
1 parent 9d7cdfe commit 53a0337

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Build
4040
run: |
4141
cd demo
42-
pnpm run build
42+
GITHUB_PAGES=true pnpm run build
4343
4444
- name: Setup Pages
4545
uses: actions/configure-pages@v4

demo/next.config.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
import type { NextConfig } from "next";
22

3+
/** @type {import('next').NextConfig} */
4+
const isGithubPages = process.env.GITHUB_PAGES === 'true';
5+
36
const nextConfig: NextConfig = {
47
output: 'export',
58
trailingSlash: true,
69
images: {
710
unoptimized: true
811
},
9-
basePath: '',
10-
assetPrefix: '',
12+
...(isGithubPages
13+
? {
14+
basePath: '/pvq-sdk',
15+
assetPrefix: '/pvq-sdk/',
16+
}
17+
: {}),
1118
};
1219

1320
export default nextConfig;

0 commit comments

Comments
 (0)