NISTtheDocs2Death Action

This GitHub action uses the Sphinx tool to build documentation in https://github.com/usnistgov projects and then host on https://pages.nist.gov as an approximation of ReadTheDocs.

Usage

This action is invoked by adding a workflow file to your repository, such as .github/workflows/NISTtheDocs2Death.yml:

name: "Build Documentation"

on: [push, pull_request, delete]

jobs:
  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: usnistgov/NISTtheDocs2Death@0.1
        with:
          docs-folder: docs/
          separated-layout: false
          pages-branch: 'nist-pages'
          pages-url: 'https://pages.nist.gov'
          formats: ''
          build-html-command: make html
          build-epub-command: make epub
          build-pdf-command: make epub
          pre-build-command: ''

Inputs

docs-folder

The folder containing your Sphinx configuration.

separated-layout

Whether Sphinx is configured to have separate source/ and build/ directories or if the source files and the _build/ directory is inside the configuration directory.

pages-branch

The branch linked to your documentation server.

pages-url

URL of the web server for served documentation.

formats

Type(s) of output desired in addition to html (pdf, and/or epub).

build-html-command

The command used by usnistgov/sphinx-action to build your html documentation.

build-epub-command

The command used by usnistgov/sphinx-action to build your ePUB documentation.

build-pdf-command

The command used by usnistgov/sphinx-action to build your PDF documentation.

pre-build-command

Run by usnistgov/sphinx-action before the build command. You can use this to install system level dependencies, for example, with “apt-get update -y && apt-get install -y perl”.

Implementation

This action implements a composite workflow with the following major steps:

  1. actions/checkout

  2. borg_the_docs Sub-Action

  3. usnistgov/sphinx-action

  4. update_pages Sub-Action

  5. ad-m/github-push-action

  6. actions/upload-artifact