Skip to content

Commit 5be7168

Browse files
authored
Merge branch 'main' into renovate/major-github-actions
2 parents c64fa1a + 3a0bc9e commit 5be7168

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎.github/workflows/hugo.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ name: Deploy Hugo site to Pages
77
on:
88
push:
99
branches: [main]
10+
# Build on every pull request too, so a change to the layout, the content or
11+
# the Hugo version has to prove the site still builds before it lands.
12+
# Without this the workflow ran only on main, which meant a dependency bump
13+
# arrived with no signal at all -- its checks read "no checks", which is not
14+
# the same thing as green and must not be merged as if it were.
15+
pull_request:
1016
workflow_dispatch:
1117

1218
# Allow only one concurrent deployment, skipping runs queued between
@@ -61,6 +67,10 @@ jobs:
6167
path: ./public
6268

6369
deploy:
70+
# Only main publishes. A pull request stops after build above: it has built
71+
# the site and uploaded the artifact, which is the whole point of the gate,
72+
# and it has no business replacing what is served.
73+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
6474
environment:
6575
name: github-pages
6676
url: ${{ steps.deployment.outputs.page_url }}

0 commit comments

Comments
 (0)