Skip to content

Commit 0f301ef

Browse files
committed
Always run the build step of the publish workflow, but only deploy on main branch
1 parent bf37632 commit 0f301ef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: Deploy Hugo site to Pages
22

33
on:
44
push:
5-
branches:
6-
- main
75
workflow_dispatch:
86

97
permissions:
@@ -45,10 +43,13 @@ jobs:
4543
run: make -C community.hachyderm.io hugo
4644
- name: Upload artifact
4745
uses: actions/upload-pages-artifact@v3
46+
if: ${{ github.ref == 'refs/heads/main' }}
4847
with:
4948
path: community.hachyderm.io/public/
5049

50+
# Only run deploy on main branch, all others just run the build as a CI step.
5151
deploy:
52+
if: ${{ github.ref == 'refs/heads/main' }}
5253
environment:
5354
name: github-pages
5455
url: ${{ steps.deployment.outputs.page_url }}

0 commit comments

Comments
 (0)