Automate docs building and publication

Ouverte
#170 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
58/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
github-actions, python
Domaine
ci-cd, documentation

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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/.
Langage dominant
Python
Étoiles
21
Forks
11
Merge moyen
3 h 7 min
PR mergées (30 j)
11

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de NCAS-CMS/cf-plot

Toutes les issues de NCAS-CMS/cf-plot

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.