Skip to content

Commit

Permalink
[fix] Building errors of Development & Production environments
Browse files Browse the repository at this point in the history
  • Loading branch information
TechQuery committed Sep 3, 2024
1 parent 2641d49 commit 4c177bf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ WORKDIR /app

FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i --frozen-lockfile
RUN pnpm build
RUN CI=true pnpm build

FROM base
COPY --from=build /app/.next/standalone ./
Expand Down
5 changes: 3 additions & 2 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import RemarkGfm from 'remark-gfm';
import RemarkMdxFrontMatter from 'remark-mdx-frontmatter';
import WP from 'webpack';

const { NODE_ENV, SENTRY_AUTH_TOKEN, SENTRY_ORG, SENTRY_PROJECT } = process.env;
const { NODE_ENV, CI, SENTRY_AUTH_TOKEN, SENTRY_ORG, SENTRY_PROJECT } =
process.env;
const isDev = NODE_ENV === 'development';

const withMDX = NextMDX({
Expand Down Expand Up @@ -86,7 +87,7 @@ const rewrites = async () => ({
const nextConfig = withPWA(
withLess(
withMDX({
output: 'standalone',
output: CI ? 'standalone' : undefined,
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
transpilePackages: ['@sentry/browser'],
webpack,
Expand Down
2 changes: 1 addition & 1 deletion pages/api/GitHub/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const proxyGithub = <T>(dataFilter?: (path: string, data: T) => T) =>
response.send(dataFilter?.(path, data as T) || data);
});

const client_id = process.env.NEXT_PUBLIC_GITHUB_OAUTH_CLIENT_ID!,
const client_id = process.env.GITHUB_OAUTH_CLIENT_ID!,
client_secret = process.env.GITHUB_OAUTH_CLIENT_SECRET!,
{ VERCEL } = process.env;

Expand Down

1 comment on commit 4c177bf

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for oss-toolbox ready!

✅ Preview
https://oss-toolbox-8gphc9x8i-techquerys-projects.vercel.app

Built with commit 4c177bf.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.