From 935ca749b07c9b3911ceff05a29f66ffc1b5458c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Mar 2026 14:07:26 +0000 Subject: [PATCH 1/2] Initial plan From 24d84345a6d43b5d150883f71866e61abd4718fa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Mar 2026 14:11:40 +0000 Subject: [PATCH 2/2] Add docs PR preview deployment and artifact upload to docs workflow Co-authored-by: JohnGriffiths <397826+JohnGriffiths@users.noreply.github.com> --- .github/workflows/docs.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5f8953695..3b8b6ed36 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,6 +5,11 @@ on: branches: [ master, develop, 'dev/*' ] pull_request: branches: [ master, develop ] + types: [opened, synchronize, reopened, closed] + +permissions: + contents: write + pull-requests: write jobs: build: @@ -16,11 +21,13 @@ jobs: fetch-depth: 0 - name: Set up Python + if: github.event.action != 'closed' uses: actions/setup-python@v4 with: python-version: 3.8 - name: Install dependencies + if: github.event.action != 'closed' run: | make install-deps-apt python -m pip install --upgrade pip wheel @@ -29,11 +36,13 @@ jobs: make install-deps-wxpython - name: Build project + if: github.event.action != 'closed' run: | make install-docs-build-dependencies - name: Get list of changed files + if: github.event.action != 'closed' id: changes run: | git fetch origin master @@ -42,6 +51,7 @@ jobs: - name: Determine build mode + if: github.event.action != 'closed' id: mode run: | if grep -vqE '^examples/.*\.py$' changed_files.txt; then @@ -56,6 +66,7 @@ jobs: - name: Cache built documentation + if: github.event.action != 'closed' id: cache-docs uses: actions/cache@v4 with: @@ -67,9 +78,37 @@ jobs: - name: Build docs + if: github.event.action != 'closed' run: | make docs + + - name: Upload docs artifact + if: github.event.action != 'closed' + uses: actions/upload-artifact@v4 + with: + name: docs-${{ github.sha }} + path: doc/_build/html + + + - name: Deploy PR Preview + if: github.event_name == 'pull_request' && github.event.action != 'closed' + uses: rossjrw/pr-preview-action@v1 + with: + source-dir: doc/_build/html + preview-branch: gh-pages + umbrella-dir: pr-preview + action: deploy + + - name: Remove PR Preview + if: github.event_name == 'pull_request' && github.event.action == 'closed' + uses: rossjrw/pr-preview-action@v1 + with: + source-dir: doc/_build/html + preview-branch: gh-pages + umbrella-dir: pr-preview + action: remove + - name: Deploy Docs uses: peaceiris/actions-gh-pages@v3