Skip to content

Commit

Permalink
CI: build docs on Windows and in separate job
Browse files Browse the repository at this point in the history
  • Loading branch information
swt2c committed Sep 10, 2024
1 parent 021b67f commit 20a1db5
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,9 @@ jobs:
short_name=win32
fi
fi
if [ ${{ matrix.os }} == ubuntu-22.04 ] && [ ${{ matrix.python-version }} == 3.10 ] && [ ${{ github.event_name }} == 'push' ]; then
build_docs=yes
else
build_docs=no
fi
echo "short_name=$short_name" >> "$GITHUB_OUTPUT"
echo "canonical_id=$short_name-py${{ matrix.python-version }}-${{ matrix.architecture}}" >> "$GITHUB_OUTPUT"
echo "build_opts=$build_opts" >> "$GITHUB_OUTPUT"
echo "build_docs=$build_docs" >> "$GITHUB_OUTPUT"
- name: Checkout repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -222,17 +216,37 @@ jobs:
name: wxPython-wheel-${{ steps.init.outputs.canonical_id }}
path: dist/wxPython-*.whl

build-documentation:
name: Build wxPython documentation
if: github.event_name == 'push'
runs-on: windows-2022

steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'

- name: Install Python dependencies
run: |
python -m pip install --upgrade -r requirements.txt
- name: Build documentation
if: ${{ steps.init.outputs.build_docs == 'yes' }}
run: |
python build.py setrev wxlib sphinx bdist_docs docset_py
cd dist
python build.py setrev dox etg sip build_wx build_py wxlib sphinx bdist_docs docset_py
- name: Save docs as job artifact
if: ${{ steps.init.outputs.build_docs == 'yes' }}
uses: actions/upload-artifact@v4
with:
name: docs
path: dist/wxPython-docs*-${{ steps.generate.outputs.version }}.tar.gz
path: dist/wxPython-docs*.tar.gz


publish-to-pypi:
Expand Down

0 comments on commit 20a1db5

Please sign in to comment.