Skip to content

Commit f1acc6b

Browse files
committed
Merge branch 'main' into feature/christenjack/storage
2 parents f6b8047 + 2b4d1c4 commit f1acc6b

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.github/workflows/frontend.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ jobs:
1717
npm ci --legacy-peer-deps
1818
npm run lint-check
1919
npm run build
20+
env:
21+
NEXT_PUBLIC_BACKEND_URL: ${{ vars.NEXT_PUBLIC_BACKEND_URL }}
22+
NEXT_PUBLIC_FIREBASE_SETTINGS: ${{ vars.NEXT_PUBLIC_FIREBASE_SETTINGS }}
23+
NEXT_PUBLIC_PAYPAL_CLIENT_SECRET: ${{ vars.NEXT_PUBLIC_PAYPAL_CLIENT_SECRET }}
24+
NEXT_PUBLIC_PAYPAL_CLIENT_ID: ${{ vars.NEXT_PUBLIC_PAYPAL_CLIENT_ID }}

frontend/src/app/admin/firebase/firebase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export type FirebaseServices = { auth: Auth; storage: FirebaseStorage };
1212
*/
1313
export const initFirebase = (): FirebaseServices => {
1414
if (!env.NEXT_PUBLIC_FIREBASE_SETTINGS) {
15-
throw new Error("Cannot get firebase settings");
15+
throw new Error("Cannot get firebase settings. " + process.env.NEXT_PUBLIC_FIREBASE_SETTINGS);
1616
}
1717

1818
const firebaseConfig = env.NEXT_PUBLIC_FIREBASE_SETTINGS as FirebaseOptions;

frontend/src/app/admin/util/validateEnv.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
import { cleanEnv } from "envalid";
7-
import { json, str } from "envalid/dist/validators";
7+
import { str, json } from "envalid/dist/validators";
88

99
/**
1010
* NextJS only allows the frontend to access environment variables if they start with
@@ -19,7 +19,7 @@ export default cleanEnv(
1919
},
2020
{
2121
NEXT_PUBLIC_BACKEND_URL: str(), // URL of our backend
22-
NEXT_PUBLIC_FIREBASE_SETTINGS: json(), // Firebase settings for frontend, stored as a JSON string
22+
NEXT_PUBLIC_FIREBASE_SETTINGS: json(), // Firebase settings for frontend
2323
NEXT_PUBLIC_PAYPAL_CLIENT_SECRET: str(),
2424
NEXT_PUBLIC_PAYPAL_CLIENT_ID: str(),
2525
},

0 commit comments

Comments
 (0)