Automate docs building and publication

Đang mở
#170 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
58/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, python
Lĩnh vực
ci-cd, documentation

Hướng nghiên cứu

Start by resolving the prerequisite build errors tracked in #35, then read the docs dependency group in pyproject.toml and the existing Sphinx configuration and build command. Add a GitHub Actions workflow that checks documentation builds for pull requests targeting main and publishes the generated HTML to GitHub Pages on pushes to main. Done means both workflow paths use the existing build setup and the published site updates from main.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

CI docs infrastructure

Instead of manually re-building the Sphinx docs to include any changes in the source, then pushing manually those generated HTML changes commit(s) to the GitHub Pages publishing source, it would be better to have an Actions workflow to do this to cover the full deployment of the docs.

Motivation

I have been manually re-building the docs locally as-and-when required using the relevant build command using an environment with the required docs dependencies:

https://github.com/NCAS-CMS/cf-plot/blob/6d01eb0d27849bec4435efb62624d5cc4040e5b9/pyproject.toml#L83-L88

but each build produces a large diff due to tendency for small source/RST changes to produce more extensive changes across built HTML. This can clog up PR 'Files changed' to make it harder to see the source changes. The updated HTML needs to be pushed as commit(s) too, but with automated builds this pushing isn't required.

Plan

Tackle #35 first to ensure there are no build errors to begin with. Then add a GitHub Actions workflow to build the Sphinx documentation and automatically deploy the generated HTML to GitHub Pages. The workflow should:

  • Build the documentation when a pull request targeting main is opened or updated, to check that documentation changes do not introduce build errors.
  • Automatically build and deploy the documentation whenever changes are pushed to main.
  • Install the necessary Python and system dependencies for the documentation build, using the existing docs optional dependency group in pyproject.toml.
  • Use the existing Sphinx configuration and build command rather than introducing a separate documentation build configuration.
  • Publish the generated HTML to the existing GitHub Pages site at https://ncas-cms.github.io/cf-plot/.
Ngôn ngữ chính
Python
Star
21
Fork
11
Merge trung bình
3 giờ 7 phút
Pull request đã merge (30 ngày)
11

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NCAS-CMS/cf-plot

Tất cả issue của NCAS-CMS/cf-plot

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.