Skip to content

Commit 49125a3

Browse files
committed
add env variable to the build stage
1 parent 5c6b1e0 commit 49125a3

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
build-args: |
4848
NEXT_PUBLIC_POSTHOG_KEY=${{ vars.NEXT_PUBLIC_POSTHOG_KEY }}
4949
NEXT_PUBLIC_URI=${{ vars.NEXT_PUBLIC_URI }}
50+
GRAPHQL_SECRET_KEY=${{ secrets.GRAPHQL_SECRET_KEY }}
5051
5152
# 4. SSH to droplet and deploy
5253
- name: SSH to droplet and deploy

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ RUN corepack enable && corepack prepare pnpm@10 --activate
2121
RUN pnpm i --frozen-lockfile
2222

2323
FROM base AS builder
24+
ARG GRAPHQL_SECRET_KEY
25+
ENV GRAPHQL_SECRET_KEY=$GRAPHQL_SECRET_KEY
26+
2427
WORKDIR /app
2528
COPY --from=deps /app/node_modules ./node_modules
2629
COPY . .

components/tabs/tabs.tsx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import Link from 'next/link';
2+
import { FC } from 'react';
3+
4+
type TabsBarProps = {
5+
children: React.ReactNode;
6+
};
7+
8+
type TabProps = {
9+
href: string;
10+
children: React.ReactNode;
11+
};
12+
13+
export const TabsBar: FC<TabsBarProps> = ({ children }) => {
14+
return (
15+
<div className="text-sm font-medium text-center text-gray-500 border-b border-gray-200 dark:text-gray-400 dark:border-gray-700">
16+
<ul className="flex flex-wrap -mb-px">{children}</ul>
17+
</div>
18+
);
19+
};
20+
21+
export const Tab: FC<TabProps> = ({ href, children }) => {
22+
return (
23+
<li className="me-2">
24+
<Link
25+
href={href}
26+
className="inline-block p-4 border-b-2 border-transparent rounded-t-lg hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300"
27+
>
28+
{children}
29+
</Link>
30+
</li>
31+
);
32+
};

0 commit comments

Comments
 (0)