Skip to content

Commit

Permalink
chore: fix missing env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Goldziher committed Jan 15, 2024
1 parent 23a4a13 commit de3fd7a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
FIREBASE_PROJECT_ID=${{vars.GCP_PROJECT_ID}}
FIREBASE_STORAGE_BUCKET=${{vars.FIREBASE_STORAGE_BUCKET}}
FRONTEND_HOST=${{vars.FRONTEND_HOST}}
SCHEDULE_MEETING_URL=${{vars.SCHEDULE_MEETING_URL}}
SEGMENT_WRITE_KEY=${{secrets.SEGMENT_WRITE_KEY}}
SERVICE_NAME=${{env.SERVICE_NAME}}
tags: |
Expand Down
6 changes: 4 additions & 2 deletions docker/Dockerfile.frontend
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ RUN pnpm add -D @next/swc-linux-arm64-gnu @next/swc-linux-arm64-musl
FROM install AS build
WORKDIR /app/

ARG BACKEND_URL
ARG DISCORD_INVITE_URL
ARG FIREBASE_API_KEY
ARG FIREBASE_APP_ID
Expand All @@ -25,9 +26,9 @@ ARG FIREBASE_MESSAGE_SENDER_ID
ARG FIREBASE_MICROSOFT_TENANT_ID
ARG FIREBASE_PROJECT_ID
ARG FIREBASE_STORAGE_BUCKET
ARG SEGMENT_WRITE_KEY
ARG BACKEND_URL
ARG FRONTEND_HOST
ARG SCHEDULE_MEETING_URL
ARG SEGMENT_WRITE_KEY

ENV NEXT_PUBLIC_BACKEND_URL="${BACKEND_URL}"
ENV NEXT_PUBLIC_DISCORD_INVITE_URL="${DISCORD_INVITE_URL}"
Expand All @@ -40,6 +41,7 @@ ENV NEXT_PUBLIC_FIREBASE_MICROSOFT_TENANT_ID="${FIREBASE_MICROSOFT_TENANT_ID}"
ENV NEXT_PUBLIC_FIREBASE_PROJECT_ID="${FIREBASE_PROJECT_ID}"
ENV NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET="${FIREBASE_STORAGE_BUCKET}"
ENV NEXT_PUBLIC_FRONTEND_HOST="${FRONTEND_HOST}"
ENV NEXT_PUBLIC_SCHEDULE_MEETING_URL="${SCHEDULE_MEETING_URL}"
ENV NEXT_PUBLIC_SEGMENT_WRITE_KEY="${SEGMENT_WRITE_KEY}"

ENV NODE_ENV=production
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/static-site/nav-auction-icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const NavAuctionIconsList = [
{
icon: <Github />,
name: 'github-button',
url: getEnv().NEXT_PUBLIC_URL_GITHUB,
url: 'https://github.com/orgs/basemind-ai/repositories',
},
{
icon: <Book />,
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/utils/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export interface Env {
NEXT_PUBLIC_FRONTEND_HOST: string;
NEXT_PUBLIC_SCHEDULE_MEETING_URL: string;
NEXT_PUBLIC_SEGMENT_WRITE_KEY: string;
NEXT_PUBLIC_URL_GITHUB: string;
}

/*
Expand Down Expand Up @@ -52,7 +51,6 @@ export function getEnv(): Env {
process.env.NEXT_PUBLIC_SCHEDULE_MEETING_URL ?? '',
NEXT_PUBLIC_SEGMENT_WRITE_KEY:
process.env.NEXT_PUBLIC_SEGMENT_WRITE_KEY ?? '',
NEXT_PUBLIC_URL_GITHUB: process.env.NEXT_PUBLIC_URL_GITHUB ?? '',
} satisfies Env;

if (process.env.NODE_ENV !== 'test') {
Expand Down
1 change: 0 additions & 1 deletion frontend/tests/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const mockEnv = {
NEXT_PUBLIC_FIREBASE_PROJECT_ID: 'devlingo-demo',
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: 'devlingo-demo.appspot.com',
NEXT_PUBLIC_FRONTEND_HOST: 'http://localhost:3000',
NEXT_PUBLIC_GITHUB_URL: 'http://www.example.com',
NEXT_PUBLIC_SCHEDULE_MEETING_URL: 'http://www.example.com',
NEXT_PUBLIC_SEGMENT_WRITE_KEY: faker.string.uuid(),
} satisfies Env;
Expand Down

0 comments on commit de3fd7a

Please sign in to comment.