From 1afc6d7b2d6d00f352e35c0b9873b2ac7275c465 Mon Sep 17 00:00:00 2001 From: Andrin <65789180+codeofandrin@users.noreply.github.com> Date: Mon, 18 Nov 2024 23:01:17 +0100 Subject: [PATCH] Add preview url to deployment --- .github/workflows/prev.deploy.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prev.deploy.yml b/.github/workflows/prev.deploy.yml index bcd7f31..e47ff81 100644 --- a/.github/workflows/prev.deploy.yml +++ b/.github/workflows/prev.deploy.yml @@ -10,7 +10,9 @@ on: jobs: Deploy-Preview: runs-on: ubuntu-latest - environment: preview + environment: + name: preview + url: ${{ steps.deployment.outputs.preview_url }} steps: - uses: actions/checkout@v3 - name: Install Vercel CLI @@ -20,4 +22,6 @@ jobs: - name: Build Project Artifacts run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy Project Artifacts to Vercel - run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} + id: deployment + run: echo "preview_url=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})\n" >> $GITHUB_OUTPUT +