diff --git a/.github/workflows/ui-tests.yaml b/.github/workflows/ui-tests.yaml index 31602f7d..894a903d 100644 --- a/.github/workflows/ui-tests.yaml +++ b/.github/workflows/ui-tests.yaml @@ -73,6 +73,26 @@ jobs: repo: context.repo.repo, body: `Deployed to ${deploymentUrl}`, }); + - name: Add deployment to PR + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const fs = require('fs'); + const deploymentUrl = fs.readFileSync('_vercel-deployment-url', 'utf8'); + await github.rest.repos.createDeployment({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: context.sha, + environment: 'preview', + transient_environment: true, + required_contexts: [], + auto_merge: false, + production_environment: false, + payload: JSON.stringify({ + deploymentUrl, + }), + }); interaction-and-and-accessibility: runs-on: ubuntu-latest