Skip to content

Commit

Permalink
Merge pull request #17 from osakunta/next-site
Browse files Browse the repository at this point in the history
updates CI for next-site branch
  • Loading branch information
YB-BigSwan authored Aug 6, 2024
2 parents 4ea2239 + cedcda1 commit 577b530
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v3
- run: npm install && npm run lint && npm run test && npm run build
env:
NEXT_PUBLIC_DIRECTUS_URL: ${{ secrets.CMS_URL }}
DIRECTUS_URL: ${{ secrets.CMS_URL }}

- uses: FirebaseExtended/action-hosting-deploy@v0
id: firebase
Expand Down
13 changes: 5 additions & 8 deletions lib/fetchNavData.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
2 changes: 1 addition & 1 deletion lib/fetchNavData.ts
Original file line number Diff line number Diff line change
@@ -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",
};
Expand Down
2 changes: 1 addition & 1 deletion pages/nation-info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function NationInfo({ navData }: NavProps) {
return (
<>
<Navbar navData={navData} />
<p>hi</p>
<p>hi!</p>
</>
);
}

0 comments on commit 577b530

Please sign in to comment.