Skip to content

Commit

Permalink
fix: ENABLE_CN_DOMAIN will hardcode when build (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaiJi authored Dec 26, 2023
1 parent 615fba7 commit 003e582
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
XATA_FALLBACK_BRANCH: ${{ vars.XATA_FALLBACK_BRANCH }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
ENABLE_TRACK: ${{ vars.ENABLE_TRACK }}
ENABLE_CN_DOMAIN: true
NEXT_PUBLIC_ENABLE_CN_DOMAIN: true
CN_STATIC_URL: ${{vars.CN_STATIC_URL}}
SENTRY_DSN: ${{vars.SENTRY_DSN}}
NEXT_PUBLIC_SENTRY_DSN: ${{vars.SENTRY_DSN}}
Expand Down
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({
});

const isProd = process.env.NODE_ENV === "production";
const isEnableCN = process.env.ENABLE_CN_DOMAIN === "true";
const isEnableCN = process.env.NEXT_PUBLIC_ENABLE_CN_DOMAIN === "true";
const CN_STATIC_URL = process.env.CN_STATIC_URL;

const gitRevisionPlugin = new GitRevisionPlugin();
Expand Down
2 changes: 1 addition & 1 deletion src/components/layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Header from "@/components/layout/header";
import Footer from "@/components/layout/footer";
import { useRouter } from "next/router";

const isEnableCN = process.env.ENABLE_CN_DOMAIN === "true";
const isEnableCN = process.env.NEXT_PUBLIC_ENABLE_CN_DOMAIN === "true";

export default function Layout({
children,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/imageLoader.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ImageLoaderProps } from "next/image";
import { EventRecord } from "@/xata/xata";

const ENABLE_CN_DOMAIN = process.env.ENABLE_CN_DOMAIN === "true";
const ENABLE_CN_DOMAIN = process.env.NEXT_PUBLIC_ENABLE_CN_DOMAIN === "true";
const CN_IMAGE_URL = "images.furrycons.cn";
const GLOBAL_IMAGE_URL = "images.furryeventchina.com";

Expand Down

0 comments on commit 003e582

Please sign in to comment.