Skip to content

Commit 1086a0f

Browse files
committed
Only run CI on push to master and on PRs
1 parent dac427d commit 1086a0f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: CI
2-
on: [ push, pull_request ]
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
37
env:
48
RUST_BACKTRACE: 1
59
jobs:
@@ -40,7 +44,7 @@ jobs:
4044

4145
deploy:
4246
needs: [ build ]
43-
if: github.ref == 'refs/heads/master'
47+
if: github.action == 'push' && github.ref == 'refs/heads/master'
4448
environment:
4549
name: github-pages
4650
permissions:

0 commit comments

Comments
 (0)