Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9fbc332

Browse files
committed
Only restrict to deploying on pushes to master in the python/peps repo
1 parent 82cd151 commit 9fbc332

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/deploy-gh-pages.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,20 @@ name: Deploy to GitHub Pages
33
on:
44
push:
55
branches: [master]
6+
pull_request:
67

78
jobs:
89
deploy-to-pages:
910
runs-on: ubuntu-latest
1011

12+
# If on the python/peps repo, only deploy on pushes to `master`. Otherwise, build
13+
# and deploy on pushes to master or pull requests.
14+
if: >
15+
(
16+
(github.repository == 'python/peps' && github.ref == 'refs/heads/master')
17+
|| (github.repository != 'python/peps')
18+
)
19+
1120
steps:
1221
- name: 🛎️ Checkout
1322
uses: actions/checkout@v2

0 commit comments

Comments
 (0)