Skip to content

Commit 2568d90

Browse files
authored
Prevent preview deploys in public repo from failing in merge queue (#52768)
1 parent 7ac9587 commit 2568d90

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/azure-preview-env-deploy-public.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,15 @@ jobs:
3737
build-and-deploy-azure-preview-public:
3838
name: Build and deploy Azure preview environment (public)
3939
runs-on: ubuntu-latest
40-
if: github.repository == 'github/docs'
40+
# Ensure this is actually a pull request and not a merge group
41+
# If its a merge group, report success without doing anything
42+
# See https://bit.ly/3qB9nZW > If a job in a workflow is skipped due to a conditional, it will report its status as "Success".
43+
if: |
44+
(
45+
(github.event.pull_request.head.sha)
46+
&& (github.event.number || github.run_id)
47+
)
48+
&& github.repository == 'github/docs'
4149
timeout-minutes: 15
4250
environment:
4351
name: preview-env-${{ github.event.number }}

0 commit comments

Comments
 (0)