Skip to content

Commit 6060315

Browse files
authored
Merge pull request #623 from cvanelteren/add-docs-to-workflow
Add docs to workflow
2 parents 4e5251e + d848f8a commit 6060315

File tree

2 files changed

+88
-4
lines changed

2 files changed

+88
-4
lines changed

.github/workflows/build.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,87 @@ jobs:
211211
python -m twine check dist/*.tar.gz
212212
python -m twine check dist/*.whl
213213
214+
docs:
215+
name: Build documentation
216+
needs: [build_wheels]
217+
runs-on: ubuntu-22.04
218+
steps:
219+
- uses: actions/checkout@v4
220+
221+
- name: Set up Python
222+
uses: actions/setup-python@v5
223+
with:
224+
python-version: "3.9"
225+
226+
- name: Download data packages
227+
uses: actions/download-artifact@v4
228+
with:
229+
path: ./data_packages/
230+
pattern: "dist-basemap_data*"
231+
merge-multiple: true
232+
233+
- name: Download basemap wheel for Linux
234+
uses: actions/download-artifact@v4
235+
with:
236+
path: ./wheels/
237+
pattern: "dist-basemap-wheels-ubuntu-*"
238+
merge-multiple: true
239+
240+
- name: Install packages
241+
run: |
242+
# Get Python version.
243+
IMPL=cp$(python -c "import sys; print('{0}{1}'.format(*sys.version_info[:2]))")
244+
245+
# Install basemap wheel matching current Python version.
246+
WHEEL=$(find ./wheels -name "*-${IMPL}-${IMPL}*.whl" | head -1)
247+
if [ -n "${WHEEL}" ]; then
248+
python -m pip install "${WHEEL}"
249+
else
250+
echo "No matching wheel found for ${IMPL}-${IMPL}"
251+
exit 1
252+
fi
253+
254+
# Install basemap data packages.
255+
python -m pip install ./data_packages/*.whl
256+
257+
- name: Install docs requirements
258+
run: |
259+
cd packages/basemap
260+
python -m pip install -r requirements-doc.txt
261+
262+
- name: Run sphinx
263+
run: |
264+
cd packages/basemap
265+
python -m sphinx doc/source public
266+
267+
- name: Upload docs artifacts
268+
uses: actions/upload-artifact@v4
269+
with:
270+
name: docs
271+
path: packages/basemap/public
272+
273+
- name: Upload github-pages artifact
274+
uses: actions/upload-pages-artifact@v3
275+
with:
276+
name: github-pages
277+
path: packages/basemap/public
278+
279+
pages:
280+
name: Deploy documentation
281+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
282+
needs: [docs, check]
283+
runs-on: ubuntu-22.04
284+
environment:
285+
name: github-pages
286+
url: ${{ steps.deployment.outputs.page_url }}
287+
permissions:
288+
pages: write
289+
id-token: write
290+
steps:
291+
- name: Deploy github-pages
292+
uses: actions/deploy-pages@v3
293+
id: deployment
294+
214295
upload:
215296
name: Upload packages
216297
needs: [build_data, build_sdist, build_wheels, check]

CHANGELOG.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ https://semver.org/spec/v2.0.0.html
1515
### Added
1616
- Python 3.13 support (PR [#619], solves issue [#608]).
1717
- NumPy 2.0 support (PR [#614] by @cvanelteren, solves issue [#604]).
18-
- Automated wheels for x86_64 and arm64 (PRs [#620] and [#622] by
19-
@cvanelteren, solves issue [#608]).
18+
- Automated wheels for x86_64 and arm64 (PR [#620] by @cvanelteren,
19+
solves issue [#608]).
2020

2121
### Changed
2222
- **BREAKING CHANGE**: Set Python minimum supported version to 3.9.
2323
- **BREAKING CHANGE**: Migrate `basemap` libraries to use implicit
2424
namespace packages (PR [#576] by @ksunden).
25-
- Migrate workflows to use `cibuildwheel` (PRs [#614] and [#618] by
26-
@cvanelteren and PR [#621], solves GitHub artifact actions v1 sunset).
25+
- Migrate workflows to use `cibuildwheel` (PRs [#614], [#618], [#622]
26+
and [#623] by @cvanelteren and PR [#621], solves GitHub artifact
27+
actions v1 sunset).
2728
- Update library dependencies:
2829
- Upgrade upper limit for `basemap_data` to 3.0.
2930
- Upgrade lower limit for `packaging` to 20.5.
@@ -1156,6 +1157,8 @@ https://semver.org/spec/v2.0.0.html
11561157
- Fix glitches in drawing of parallels and meridians.
11571158

11581159

1160+
[#623]:
1161+
https://github.com/matplotlib/basemap/pull/623
11591162
[#622]:
11601163
https://github.com/matplotlib/basemap/pull/622
11611164
[#621]:

0 commit comments

Comments
 (0)