Skip to content

Commit 3bf3c2f

Browse files
committed
fix: workflow should build but publish only on push to master
1 parent 90128ea commit 3bf3c2f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/deployment.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ on:
44
push:
55
branches:
66
- master
7-
# Review gh actions docs if you want to further define triggers, paths, etc
8-
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
7+
pull_request:
8+
branches:
9+
- master
910

1011
jobs:
1112
build:
@@ -30,7 +31,7 @@ jobs:
3031
version: 10.11.0
3132

3233
- name: Install dependencies
33-
run: pnpm install # --frozen-lockfile
34+
run: pnpm install --frozen-lockfile
3435
- name: Build website
3536
run: pnpm build
3637

@@ -42,6 +43,7 @@ jobs:
4243
deploy:
4344
name: Deploy to GitHub Pages
4445
needs: build
46+
if: ${{ github.event_name != 'pull_request' }}
4547

4648
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
4749
permissions:

0 commit comments

Comments
 (0)