Skip to content

Commit 2a0db5d

Browse files
Add build docs check on pull request
1 parent 0b70681 commit 2a0db5d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/cd-docs.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ name: deploy-docs
22
on:
33
workflow_dispatch:
44
push:
5-
branches:
6-
- master
5+
pull_request
76
permissions:
87
contents: write
98
jobs:
@@ -17,6 +16,7 @@ jobs:
1716
run: |
1817
git config user.name github-actions[bot]
1918
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
19+
if: (github.event_name != 'pull_request')
2020

2121
- name: Set up Python 3.10
2222
uses: actions/setup-python@v5
@@ -42,3 +42,8 @@ jobs:
4242

4343
- name: Deploy to GitHub Pages
4444
run: mkdocs gh-deploy --force
45+
if: (github.event_name != 'pull_request')
46+
47+
- name: Build docs to check for errors
48+
run: mkdocs build --verbose
49+
if: (github.event_name == 'pull_request')

0 commit comments

Comments
 (0)