CI: build docs on Windows and in separate job

This commit is contained in:
Scott Talbert
2024-09-10 19:49:25 -04:00
parent 021b67f67b
commit 20a1db542f

View File

@@ -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
@@ -222,17 +216,37 @@ jobs:
name: wxPython-wheel-${{ steps.init.outputs.canonical_id }}
path: dist/wxPython-*.whl
- name: Build documentation
if: ${{ steps.init.outputs.build_docs == 'yes' }}
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 build.py setrev wxlib sphinx bdist_docs docset_py
python -m pip install --upgrade -r requirements.txt
- name: Build documentation
run: |
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: