diff --git a/.github/workflows/ui-tests.yaml b/.github/workflows/ui-tests.yaml index 7439115a..4a5817b6 100644 --- a/.github/workflows/ui-tests.yaml +++ b/.github/workflows/ui-tests.yaml @@ -76,12 +76,13 @@ jobs: }); - name: Add deployment to PR uses: actions/github-script@v6 + id: deployment with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const fs = require('fs'); const deploymentUrl = fs.readFileSync('_vercel-deployment-url', 'utf8'); - await github.rest.repos.createDeployment({ + const deployment = await github.rest.repos.createDeployment({ owner: context.repo.owner, repo: context.repo.repo, ref: context.sha, @@ -94,6 +95,7 @@ jobs: deploymentUrl, }), }); + console.log("::set-output name=deployment_id::" + deployment.data.id); - name: Add deployment status to PR uses: actions/github-script@v6 with: @@ -104,7 +106,7 @@ jobs: await github.rest.repos.createDeploymentStatus({ owner: context.repo.owner, repo: context.repo.repo, - deployment_id: context.payload.deployment.id, + deployment_id: ${{ steps.deployment.outputs.deployment_id }}, state: 'success', environment_url: deploymentUrl, log_url: deploymentUrl,