From 5ca25e699a66065dda880890cb9e815360cc973c Mon Sep 17 00:00:00 2001 From: Max Schmidt Date: Wed, 17 May 2023 16:48:30 +0200 Subject: [PATCH] test Signed-off-by: Max Schmidt --- .github/workflows/push.yml | 6 +++--- astro/src/utils/payload.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 79f2986..6f2012f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -23,13 +23,13 @@ jobs: cd ${{ secrets.PATH }} git clone -b prod https://github.com/${{ github.repository }} . mv .env.dev .env.prod - sed -i "s/ASTRO_URL=.*/ASTRO_URL=${{ env.ASTRO_URL }}/" .env.prod - sed -i "s/PAYLOAD_URL=.*/PAYLOAD_URL=${{ env.PAYLOAD_URL }}/" .env.prod + sed -i "s/ASTRO_URL=.*/ASTRO_URL=${{ vars.ASTRO_URL }}/" .env.prod + sed -i "s/PAYLOAD_URL=.*/PAYLOAD_URL=${{ vars.PAYLOAD_URL }}/" .env.prod sed -i "s/PAYLOAD_PORT=.*/PAYLOAD_PORT=${{ secrets.PAYLOAD_PORT }}/" .env.prod sed -i "s/PAYLOAD_SECRET=.*/PAYLOAD_SECRET=${{ secrets.PAYLOAD_SECRET }}/" .env.prod sed -i "s/MONGODB_URI=.*/MONGODB_URI=${{ secrets.MONGODB_URI }}/" .env.prod sed -i "s/MONGODB_USER=.*/MONGODB_USER=${{ secrets.MONGODB_USER }}/" .env.prod sed -i "s/MONGODB_PW=.*/MONGODB_PW=${{ secrets.MONGODB_PW }}/" .env.prod - sed -i "s/NAME=.*/NAME=${{ env.NAME }}/" .env.prod + sed -i "s/NAME=.*/NAME=${{ vars.NAME }}/" .env.prod fi yarn prod diff --git a/astro/src/utils/payload.ts b/astro/src/utils/payload.ts index 932cd0d..4729b8d 100644 --- a/astro/src/utils/payload.ts +++ b/astro/src/utils/payload.ts @@ -4,7 +4,7 @@ const url = process.env.NODE_ENV === "development" ? "http://payload:3001" : `https://${process.env.PAYLOAD_URL}`; -//test + export const getPosts = async () => (await (await fetch(`${url}/api/posts`)).json()).docs as Post[];