Skip to content

Commit 3251ed5

Browse files
committed
Run build in PR CI
Signed-off-by: Harry Mellor <[email protected]>
1 parent 57e3d78 commit 3251ed5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/jekyll.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
name: Deploy Jekyll site to Pages
88

99
on:
10-
# Runs on pushes targeting the default branch
10+
# Runs on pushes targeting the default branch and pull requests
1111
push:
1212
branches: ["main"]
13+
pull_request:
1314

1415
# Allows you to run this workflow manually from the Actions tab
1516
workflow_dispatch:
@@ -52,8 +53,9 @@ jobs:
5253
# Automatically uploads an artifact from the './_site' directory by default
5354
uses: actions/upload-pages-artifact@v3
5455

55-
# Deployment job
56+
# Deployment job (only if triggered by push to main)
5657
deploy:
58+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
5759
environment:
5860
name: github-pages
5961
url: ${{ steps.deployment.outputs.page_url }}

0 commit comments

Comments
 (0)