Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ENABLE_CN_DOMAIN will hardcode when build #112

Merged
merged 1 commit into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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