Skip to content

Commit

Permalink
add test step to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
llpeterson committed Feb 8, 2024
1 parent 7aba3fe commit 6c9dad7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repo
uses: actions/checkout@v4
- name: Validate reST source
run: make test
- name: Build docs
run: make multiversion
- name: List built files
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $(VENV_NAME):

# test - check that local build will lint, spelling is correct, then
# build the html site.
test: license doc8 dict-check spelling linkcheck
test: doc8 dict-check spelling linkcheck

# lint all .rst files
doc8: $(VENV_NAME)
Expand Down
31 changes: 17 additions & 14 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,37 +1,40 @@
.. SPDX-FileCopyrightText: 2021 Open Networking Foundation <[email protected]>
SPDX-License-Identifier: Apache-2.0
.. |pub-badge| image:: https://github.com/opennetworkinglab/aether-docs/actions/workflows/publish-docs.yml/badge.svg

|pub-badge|

Aether Docs
===========

This site contains Sphinx format documentation for the Aether project.
This repo contains Sphinx-formated documentation for the Aether project.

Writing Documentation
---------------------

Docs are generated using `Sphinx <https://www.sphinx-doc.org/en/master/usage/>`_ using the
Docs are generated using `Sphinx <https://www.sphinx-doc.org/en/master/usage/>`_ with
`reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/>`_ syntax.
A cheat sheet for reStructuredText can be found `here <https://github.com/ralsina/rst-cheatsheet/blob/master/rst-cheatsheet.rst>`_.

Building Documentation
--------------------------

The documentation build process is stored in a ``Makefile``. Building docs
requires Python to be installed, and most steps will create a virtualenv
(usually ``venv-docs``) which contains the required tools. You may also need
to install the ``enchant`` C library using your system's package manager for
the spelling checker to function properly.
The documentation build process is stored in a ``Makefile``. Building
docs requires Python to be installed, and most steps create a
virtualenv (usually ``venv-docs``) which contains the required tools.
You may also need to install the ``enchant`` C library using your
system's package manager for the spelling checker to function
properly.

Run ``make html`` to generate html documentation in ``_build/html``.

There is also a test target, ``make test``, which will run all the following
checks. This is what happens to validate a patchset validation.
checks. This is what happens to validate a patchset.

* ``make lint``: Check the formatting of documentation using `doc8
<https://github.com/PyCQA/doc8>`_.

* ``make license``: Verifies licensing is correct.

* ``make spelling``: Checks spelling on all documentation. If there are
additional words that are correctly spelled but not in the dictionary
(acronyms, nouns, etc.) please add them to the ``dict.txt`` file, which
Expand All @@ -45,13 +48,13 @@ checks. This is what happens to validate a patchset validation.
Versioning Documentation
----------------------------------

To change the version shown on the built site, change the contents of the
To change the version shown on the build site, change the contents of the
``VERSION`` file to be released SemVer version. This will create a tag on the
repo.

Then when ``make multiversion`` target can be used which will build all
versions tagged or branched on the remote to ``_build/multiversion``. This will
use a fork of `sphinx-multiversion
The ``make multiversion`` target can then be used to build all
versions tagged or branched on the remote to ``_build/multiversion``. This
uses a fork of `sphinx-multiversion
<https://github.com/Holzhaus/sphinx-multiversion>`_ to build multiple versions
and a menu on the site.

Expand Down

0 comments on commit 6c9dad7

Please sign in to comment.