From 45de2ef5561b2792ceab439be5aa13b616ed90d0 Mon Sep 17 00:00:00 2001 From: 39bytes Date: Mon, 27 May 2024 00:49:56 -0400 Subject: [PATCH] try again --- .github/workflows/deploy.yml | 3 +-- src/components/preact/EventInfo.tsx | 2 +- src/components/preact/Events.tsx | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 21d253e..3b855c6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,8 +16,7 @@ permissions: jobs: build: - env: - VITE_API_URL: ${{ secrets.VITE_API_URL }} + environment: github-pages runs-on: ubuntu-latest steps: - name: Checkout your repository using git diff --git a/src/components/preact/EventInfo.tsx b/src/components/preact/EventInfo.tsx index c87e148..e5dd655 100644 --- a/src/components/preact/EventInfo.tsx +++ b/src/components/preact/EventInfo.tsx @@ -24,7 +24,7 @@ const EventInfo = () => { ); useEffect(() => { setEvent(undefined); - fetch(`${import.meta.env.VITE_API_URL}/events/${id}`) + fetch(`${import.meta.env.PUBLIC_API_URL}/events/${id}`) .then((res) => res.json()) .then(setEvent) .catch((e) => { diff --git a/src/components/preact/Events.tsx b/src/components/preact/Events.tsx index 9a26eb1..91a5ef2 100644 --- a/src/components/preact/Events.tsx +++ b/src/components/preact/Events.tsx @@ -30,7 +30,7 @@ const Events = () => { ); useEffect(() => { - fetch(`${import.meta.env.VITE_API_URL}/events`) + fetch(`${import.meta.env.PUBLIC_API_URL}/events`) .then((res) => res.json()) .then(setEventData) .catch((e) => {