1- .. _ building_documentation :
1+ .. _ deploying_documentation :
22
3- Building documentation
4- ======================
3+ Deploying documentation
4+ =======================
55
66.. toctree ::
77 :maxdepth: 2
@@ -12,7 +12,7 @@ Building documentation
1212In the PTB, we use sphinx to build and validate the contents of a project's
1313documentation. All documentation is provided in the ``doc `` directory, primarily as
1414``rst `` files. The ``doc/conf.py `` acts as the configuration file for building the
15- documentation, and a default one is provided in the cookiecutter project template .
15+ documentation.
1616
1717Many of the nox session checks are executed in the ``checks.yml `` so that alterations
1818in the documentation can be directly attributed (and, if needed, fixed) in the relevant
@@ -34,3 +34,37 @@ PR. The final building & serving of the documentation happens in the ``gh-pages.
3434+--------------------------+------------------+----------------------------------------+
3535| ``links:list `` | No | Lists all links in the documentation |
3636+--------------------------+------------------+----------------------------------------+
37+
38+ .. _documentation_configuration :
39+
40+ Configuration
41+ +++++++++++++
42+
43+ ``doc/conf.py ``
44+ ^^^^^^^^^^^^^^^
45+ A default ``doc/conf.py `` is provided in the cookiecutter project template. If your
46+ project's needs deviates, please refer to:
47+
48+ * the `general sphinx documentation <https://www.sphinx-doc.org/en/master/ >`__.
49+ * specifically to the `Linkcheck Builder <https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder >`__
50+ for ``links:check `` and ``links:list ``.
51+
52+ ``gh-pages.yml ``
53+ ^^^^^^^^^^^^^^^^
54+ Within the ``gh-pages.yml ``, we use the GitHub ``upload-pages-artifact `` and ``deploy-pages ``
55+ actions. In order to properly deploy your pages, you will need to manually reconfigure the GitHub
56+ Pages settings for the repo:
57+
58+ #. Go to the affected repo's GitHub page
59+ #. Select 'Settings'
60+ #. Scroll down & select 'Pages'
61+ #. Within the 'Build and deployment' section, change 'Source' to 'GitHub Actions'.
62+
63+ You also need to configure settings for the `github-pages ` environment:
64+
65+ #. Go to the affected repo's GitHub page
66+ #. Select 'Settings'
67+ #. Scroll down & select 'Environment'
68+ #. Click on 'github-pages'
69+ #. In the 'Deployment branches and tags', click 'Add deployment branch or tag rule'
70+ #. Select 'Ref type' to be 'Tag' and set the 'Name pattern' to `[0-9]*.[0-9]*.[0-9]* ` (or whatever matches that repo's tags)
0 commit comments