@@ -469,18 +469,63 @@ Actions.
469469 <https://github.com/orgs/sagemath/packages?tab=packages&q=with-targets-optional> `_
470470 exists.
471471
472- * The `build documentation workflow
472+ * The `documentation build workflow
473473 <https://github.com/sagemath/sage/blob/develop/.github/workflows/doc-build.yml> `_
474474 on GitHub Actions builds the HTML documentation for the current branch.
475475
476- A link to the built doc is added in a comment, and so you can easily inspect changes
477- to the documentation without the need to locally rebuild the docs yourself.
476+ A link to the built doc is added in a comment, and so you can easily inspect
477+ changes to the documentation of the current branch without the need to
478+ locally rebuild the docs yourself.
478479
479480 If the doc build fails, you can go to Actions tab and examine `documentation
480481 build workflow
481482 <https://github.com/sagemath/sage/actions/workflows/doc-build.yml> `_ and
482483 choose the particular branch to see what went wrong.
483484
485+ Documentation Previews
486+ ======================
487+
488+ We value documentation as much as the code. Hence the Sage GitHub repo provides
489+ documentation previews before a stable release is published to the official
490+ site `<https://doc.sagemath.org >`_. Developers are expected to check the
491+ previews during the development process. Several GitHub workflows work together
492+ to create the previews.
493+
494+ As mentioned above, for a check on a PR (say #12345), an HTML documentation
495+ preview is published to `<https://doc-pr-12345--sagemath.netlify.app >`_ by the
496+ `documentation publish workflow
497+ <https://github.com/sagemath/sage/blob/develop/.github/workflows/doc-publish.yml> `_
498+ which uses the ``doc `` artifact built by `documentation build workflow
499+ <https://github.com/sagemath/sage/blob/develop/.github/workflows/doc-build.yml> `_.
500+ The run of the build workflow provides the ``doc `` artifact containing the html
501+ files.
502+
503+ The documentation preview for a PR is accompanied by a "changes" log, which is
504+ generated from diffs of the htmls in the ``doc `` artifact and the
505+ ``doc-develop `` artifact that contains the htmls of the latest release. To
506+ facilitate this, on every release, the build workflow creates the
507+ ``doc-develop `` artifact and the publish workflow publishes the html
508+ documentation to `<https://doc-develop--sagemath.netlify.app >`_.
509+
510+ PDF docs are also built for a PR by the `PDF build workflow
511+ <https://github.com/sagemath/sage/blob/develop/.github/workflows/doc-build-pdf.yml> `_.
512+ The PR author should check the success of the PDF build workflow before
513+ requesting review. If the workflow failed, check the run of the workflow.
514+
515+ The HTML documentation preview for a PR does not include PDF docs, which take
516+ much longer time to build than the HTML docs. On the other hand, the
517+ documentation preview (either HTML and PDF) contains TESTS blocks to enable the
518+ PR author to check newly added TESTS blocks. The official documentation for end
519+ users do not contain TESTS blocks.
520+
521+ Finally, on every release, the full documentation including PDF docs and
522+ featured with live (runnable) Examples (but no TESTS blocks) is built and
523+ published to `<https://doc-release--sagemath.netlify.app >`_, a link to which is
524+ in the `Documentation section of the GitHub Wiki
525+ <https://github.com/sagemath/sage/wiki#documentation-for-last-release> `_. The
526+ run of the `PDF build workflow
527+ <https://github.com/sagemath/sage/blob/develop/.github/workflows/doc-build-pdf.yml> `_
528+ contains the artifact ``livedoc `` used to publish the full documentation.
484529
485530Final notes
486531===========
0 commit comments