diff --git a/.github/workflows/ui-tests.yaml b/.github/workflows/ui-tests.yaml index 14a268ae..7439115a 100644 --- a/.github/workflows/ui-tests.yaml +++ b/.github/workflows/ui-tests.yaml @@ -94,6 +94,24 @@ jobs: deploymentUrl, }), }); + - name: Add deployment status 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.createDeploymentStatus({ + owner: context.repo.owner, + repo: context.repo.repo, + deployment_id: context.payload.deployment.id, + state: 'success', + environment_url: deploymentUrl, + log_url: deploymentUrl, + description: 'Deployed to Vercel', + environment: 'preview', + auto_inactive: true, + }); interaction-and-and-accessibility: runs-on: ubuntu-latest