Skip to content

Commit 7b34b98

Browse files
committed
Back to head ref
Using the potential merge commit doesn't report this PR as being deployed, so we need to use the head ref. The risk is that this head ref is behind the base branch, but we have that risk anyway.
1 parent 030fa00 commit 7b34b98

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

.github/workflows/deploy-preview.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,11 @@ jobs:
4545
DEPLOY: ${{ github.event.inputs.deploy_id }}
4646
run: |
4747
set -e ${RUNNER_DEBUG:+-x}
48-
ref=$(gh pr view $ISSUE --json potentialMergeCommit -q .potentialMergeCommit.oid)
49-
[ -z "$ref" ] && { echo "No merge commit for PR $ISSUE"; exit; }
5048
5149
env=staging-$ISSUE
5250
url=https://$env.cmbuckley.co.uk
5351
echo "url=$url" >> $GITHUB_OUTPUT
52+
ref=$(gh pr view $ISSUE --json headRefOid -q .headRefOid)
5453
5554
# create environment unless it exists already
5655
gh api --silent repos/{owner}/{repo}/environments/$env 2>/dev/null \

0 commit comments

Comments
 (0)