Skip to content

Commit fede30b

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

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:
@@ -49,10 +47,13 @@ jobs:
4947

5048
- name: Upload artifact
5149
uses: actions/upload-pages-artifact@v3
50+
if: ${{ github.ref == 'refs/heads/main' }}
5251
with:
5352
path: community.hachyderm.io/public/
5453

54+
# Only run deploy on main branch, all others just run the build as a CI step.
5555
deploy:
56+
if: ${{ github.ref == 'refs/heads/main' }}
5657
environment:
5758
name: github-pages
5859
url: ${{ steps.deployment.outputs.page_url }}

0 commit comments

Comments
 (0)