From 2c757bc8fa73ec77b9722ba479db0703723e187c Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Fri, 22 Oct 2021 22:31:50 -1000 Subject: [PATCH] Add commit status with preview URL --- .github/workflows/deploy-preview.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 1ecdd05f01..90e1ec6fb6 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -33,16 +33,12 @@ jobs: run: netlify deploy --dir=build/site --alias=deploy-preview-${{github.event.number}} - uses: octokit/request-action@v2.x with: - route: POST /repos/{owner}/{repo}/check-runs + route: POST /repos/{owner}/{repo}/statuses/{sha} owner: openlayers repo: openlayers - name: preview-url - head_sha: ${{github.event.pull_request.head.sha}} - details_url: https://deploy-preview-${{github.event.number}}--ol-site.netlify.app - conclusion: "success" - status: "completed" - output: | - title: Preview URL - summary: URL of the preview deploy + sha: ${{github.event.pull_request.head.sha}} + state: "success" + target_url: https://deploy-preview-${{github.event.number}}--ol-site.netlify.app + description: "Preview URL" env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}