From de3fd7ad1d48b892d801bae3823cb690538d2fe9 Mon Sep 17 00:00:00 2001 From: Na'aman Hirschfeld Date: Mon, 15 Jan 2024 12:58:38 +0100 Subject: [PATCH] chore: fix missing env variables --- .github/workflows/build-frontend.yaml | 1 + docker/Dockerfile.frontend | 6 ++++-- frontend/src/components/static-site/nav-auction-icons.tsx | 2 +- frontend/src/utils/env.ts | 2 -- frontend/tests/mocks.ts | 1 - 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-frontend.yaml b/.github/workflows/build-frontend.yaml index 398d0af6..a807087b 100644 --- a/.github/workflows/build-frontend.yaml +++ b/.github/workflows/build-frontend.yaml @@ -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: | diff --git a/docker/Dockerfile.frontend b/docker/Dockerfile.frontend index 452ac3fa..dec40f34 100644 --- a/docker/Dockerfile.frontend +++ b/docker/Dockerfile.frontend @@ -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 @@ -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}" @@ -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 diff --git a/frontend/src/components/static-site/nav-auction-icons.tsx b/frontend/src/components/static-site/nav-auction-icons.tsx index 6f11c25d..8cab0307 100644 --- a/frontend/src/components/static-site/nav-auction-icons.tsx +++ b/frontend/src/components/static-site/nav-auction-icons.tsx @@ -15,7 +15,7 @@ export const NavAuctionIconsList = [ { icon: , name: 'github-button', - url: getEnv().NEXT_PUBLIC_URL_GITHUB, + url: 'https://github.com/orgs/basemind-ai/repositories', }, { icon: , diff --git a/frontend/src/utils/env.ts b/frontend/src/utils/env.ts index 41023c2b..8d584eb7 100644 --- a/frontend/src/utils/env.ts +++ b/frontend/src/utils/env.ts @@ -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; } /* @@ -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') { diff --git a/frontend/tests/mocks.ts b/frontend/tests/mocks.ts index a3149678..aa13b06d 100644 --- a/frontend/tests/mocks.ts +++ b/frontend/tests/mocks.ts @@ -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;