From 7d3d4075a014b27af3fdf342411a496020f679ae Mon Sep 17 00:00:00 2001 From: Gerd Aschemann Date: Wed, 14 Aug 2024 16:13:59 +0200 Subject: [PATCH] WIP 332 Preserve Netlify deploy URL in environment --- .github/workflows/gh-pages.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index a009bb62..8dec74d8 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -135,19 +135,22 @@ jobs: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - - name: Output Netlify Preview URL + - name: Get Netlify Preview URL + id: netlify-status run: | + echo "NETLIFY_DEPLOY_URL=${{ fromJson(steps.netlify.outputs.NETLIFY_OUTPUT).deploy_url }}" >> $GITHUB_ENV + echo "The URL where the logs from the deployment can be found" echo "${{ fromJson(steps.netlify.outputs.NETLIFY_OUTPUT).logs }}" echo "" echo "the URL of the draft site that Netlify provides" - echo "${{ fromJson(steps.netlify.outputs.NETLIFY_OUTPUT).deploy_url }}" + echo "${{ fromJson(steps.netlify.outputs.NETLIFY_OUTPUT).deploy_url }}/" - name: Set Job Summary - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | - const deployUrl = JSON.parse(steps.netlify.outputs.NETLIFY_OUTPUT).deploy_url; + const deployUrl = process.env.NETLIFY_DEPLOY_URL; github.rest.checks.update({ owner: context.repo.owner, repo: context.repo.repo,