Skip to content

Commit 61bf59d

Browse files
committed
Move configuration information into documentation/index and reference in getting_started
1 parent 712a74a commit 61bf59d

File tree

3 files changed

+41
-22
lines changed

3 files changed

+41
-22
lines changed

doc/user_guide/features/documentation/index.rst

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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
1212
In the PTB, we use sphinx to build and validate the contents of a project's
1313
documentation. 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

1717
Many of the nox session checks are executed in the ``checks.yml`` so that alterations
1818
in 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)

doc/user_guide/features/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Features
66
.. toctree::
77
:maxdepth: 2
88

9-
documentation/index
109
collecting_metrics
1110
creating_a_release
11+
documentation/index
1212

1313
Uniform Project Layout
1414
----------------------

doc/user_guide/getting_started.rst

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -163,23 +163,8 @@ forward, and you just can use the example ``noxfile.py`` below.
163163

164164
6. Set up deploying documentation (optional)
165165
++++++++++++++++++++++++++++++++++++++++++++
166-
Within the ``gh-pages.yml``, we use the GitHub ``upload-pages-artifact`` and ``deploy-pages``
167-
actions. In order to properly deploy your pages, you'll need to reconfigure the GitHub
168-
Pages settings for the repo:
169-
170-
#. Go to the affected repo's GitHub page
171-
#. Select 'Settings'
172-
#. Scroll down & select 'Pages'
173-
#. Within the 'Build and deployment' section, change 'Source' to 'GitHub Actions'.
174-
175-
We also need to configure settings for github-pages environment:
176-
177-
#. Go to the affected repo's GitHub page
178-
#. Select 'Settings'
179-
#. Scroll down & select 'Environment'
180-
#. Click on 'github-pages'
181-
#. In the 'Deployment branches and tags', click 'Add deployment branch or tag rule'
182-
#. 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)
166+
167+
See :ref:`documentation_configuration` for the required steps.
183168

184169
7. Set up for Sonar
185170
+++++++++++++++++++

0 commit comments

Comments
 (0)