Skip to content

Commit 29cb81f

Browse files
committed
update documentation.yaml file
1 parent 5b5d65b commit 29cb81f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/documentation.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: documentation
22

3-
on: [push, pull_request, workflow_dispatch]
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
47

58
permissions:
69
contents: write
@@ -19,7 +22,10 @@ jobs:
1922
sphinx-build . _build/html
2023
- name: Deploy to GitHub Pages
2124
uses: peaceiris/actions-gh-pages@v3
22-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
25+
if: |
26+
github.event_name == 'push' &&
27+
github.ref == 'refs/heads/main' &&
28+
startsWith(github.event.head_commit.message, 'Merge pull request')
2329
with:
2430
publish_branch: gh-pages
2531
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)