Skip to content

Commit b1ea233

Browse files
authored
Use merge commit for PR instead of HEAD commit of PR (#14)
* Try to not pass explicit branch HEAD so we hopefully get the merge commit instead. * Remove existing checkout, so we really check out HEAD. * Another try: use the HEAD ref. * Yet another try. * Remove not needed step. * Document dilemma.
1 parent 66c5223 commit b1ea233

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/_shared-docs-build-pr.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,13 @@ jobs:
193193
- name: Checkout HEAD
194194
uses: actions/checkout@v2
195195
with:
196-
ref: ${{ github.event.pull_request.head.sha }}
196+
# It would be better to use
197+
#
198+
# ref: ${{ github.event.pull_request.head.sha }}
199+
#
200+
# since that also works when re-running this action for older commits of
201+
# a PR, **but** then we get https://github.com/ansible-community/github-docs-build/issues/3 back...
202+
ref: refs/pull/${{ github.event.number }}/merge
197203
path: ${{ steps.vars.outputs.checkout-path }}
198204

199205
- name: Initialize the build environment (HEAD)

0 commit comments

Comments
 (0)