From f2dbc9de3a716ffed8bb4ed45c6ba14806f69687 Mon Sep 17 00:00:00 2001 From: smokestacklightnin <125844868+smokestacklightnin@users.noreply.github.com> Date: Sun, 29 Sep 2024 18:45:55 -0700 Subject: [PATCH] Add build docs check on pull request --- .github/workflows/cd-docs.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd-docs.yml b/.github/workflows/cd-docs.yml index 94c1c704f93..58204762785 100644 --- a/.github/workflows/cd-docs.yml +++ b/.github/workflows/cd-docs.yml @@ -2,8 +2,7 @@ name: deploy-docs on: workflow_dispatch: push: - branches: - - master + pull_request: permissions: contents: write jobs: @@ -17,6 +16,7 @@ jobs: run: | git config user.name github-actions[bot] git config user.email 41898282+github-actions[bot]@users.noreply.github.com + if: (github.event_name != 'pull_request') - name: Set up Python 3.10 uses: actions/setup-python@v5 @@ -42,3 +42,8 @@ jobs: - name: Deploy to GitHub Pages run: mkdocs gh-deploy --force + if: (github.event_name != 'pull_request') + + - name: Build docs to check for errors + run: mkdocs build --verbose + if: (github.event_name == 'pull_request')