Skip to content

Commit 7270234

Browse files
committed
Add check job to pr on master and deploy only on master push
1 parent b979a58 commit 7270234

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

.github/workflows/jekyll-gh-pages.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,17 @@
22
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
33

44
on:
5-
# Runs on pushes targeting the default branch
65
push:
76
branches: ["master"]
8-
9-
# Allows you to run this workflow manually from the Actions tab
7+
pull_request:
8+
branches: ["master"]
109
workflow_dispatch:
1110

12-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1311
permissions:
1412
contents: read
1513
pages: write
1614
id-token: write
1715

18-
# Allow one concurrent deployment
1916
concurrency:
2017
group: "pages"
2118
cancel-in-progress: true
@@ -70,8 +67,8 @@ jobs:
7067
- name: Upload artifact
7168
uses: actions/upload-pages-artifact@v3
7269

73-
# Deployment job
7470
deploy:
71+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
7572
environment:
7673
name: github-pages
7774
url: ${{ steps.deployment.outputs.page_url }}

0 commit comments

Comments
 (0)