Skip to content

Commit c611f19

Browse files
ci(fix): URL with GitHub pages
1 parent 4289b01 commit c611f19

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/nextjs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches: ["website-production"]
66
workflow_dispatch:
77

8+
env:
9+
NODE_ENV: ${{ vars.NODE_ENV }}
10+
811
permissions:
912
contents: read
1013
pages: write

website/next.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import type { NextConfig } from "next";
22

3+
const isProd = process.env.NODE_ENV === "production";
34
const nextConfig: NextConfig = {
45
output: "export",
56
images: { unoptimized: true },
7+
assetPrefix: isProd ? "/Passcodes/" : "",
8+
basePath: isProd ? "/Passcodes" : "",
69
};
710

811
export default nextConfig;

0 commit comments

Comments
 (0)