From 79c06aa6c20ff2029a35b3f949f5bdde634b31c5 Mon Sep 17 00:00:00 2001 From: Stephen Swanson Date: Tue, 6 Aug 2024 14:21:20 +0300 Subject: [PATCH 1/4] updates CI for next-site branch --- pages/nation-info.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/nation-info.tsx b/pages/nation-info.tsx index 996e158..15efaa2 100644 --- a/pages/nation-info.tsx +++ b/pages/nation-info.tsx @@ -15,7 +15,7 @@ export default function NationInfo({ navData }: NavProps) { return ( <> -

hi

+

hi!

); } From 85accfdabfbdcbfd0b24033baaaa5dac1501f72b Mon Sep 17 00:00:00 2001 From: Stephen Swanson Date: Tue, 6 Aug 2024 14:29:06 +0300 Subject: [PATCH 2/4] updates CMS URL --- lib/fetchNavData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fetchNavData.ts b/lib/fetchNavData.ts index e6ef3f0..177e90f 100644 --- a/lib/fetchNavData.ts +++ b/lib/fetchNavData.ts @@ -1,6 +1,6 @@ export async function fetchNavData() { const collectionName: string = "Nav"; - const url = `${process.env.NEXT_PUBLIC_DIRECTUS_URL}items/${collectionName}`; + const url = `${process.env.DIRECTUS_URL}items/${collectionName}`; const headers = { "Content-Type": "application/json", }; From e5eee0c3f9de49a7dfcd9e27751a42f703fe8bff Mon Sep 17 00:00:00 2001 From: Stephen Swanson Date: Tue, 6 Aug 2024 14:31:13 +0300 Subject: [PATCH 3/4] update CI env variable --- .github/workflows/firebase-hosting-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 0822b54..75846cd 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v3 - run: npm install && npm run lint && npm run test && npm run build env: - NEXT_PUBLIC_CMS_URL: ${{ secrets.CMS_URL }} + DIRECTUS_URL: ${{ secrets.CMS_URL }} - uses: FirebaseExtended/action-hosting-deploy@v0 id: firebase with: From cc1cc756d0fe8d1ace67f4f738247153c60984e1 Mon Sep 17 00:00:00 2001 From: Stephen Swanson Date: Tue, 6 Aug 2024 14:35:46 +0300 Subject: [PATCH 4/4] update test env variable --- lib/fetchNavData.test.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/fetchNavData.test.ts b/lib/fetchNavData.test.ts index 73debae..6dce946 100644 --- a/lib/fetchNavData.test.ts +++ b/lib/fetchNavData.test.ts @@ -20,15 +20,12 @@ describe("fetchNavData", () => { const result = await fetchNavData(); expect(result).toEqual(mockData); expect(fetch).toHaveBeenCalledTimes(1); - expect(fetch).toHaveBeenCalledWith( - `${process.env.NEXT_PUBLIC_DIRECTUS_URL}items/Nav`, - { - method: "GET", - headers: { - "Content-Type": "application/json", - }, + expect(fetch).toHaveBeenCalledWith(`${process.env.DIRECTUS_URL}items/Nav`, { + method: "GET", + headers: { + "Content-Type": "application/json", }, - ); + }); }); it("should return an empty data object when the fetch response is not ok", async () => {