Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/docs-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This workflow is intended to be called by workflows in our various software
# repos containing Sphinx documentation projects.
# See workflow-templates/docs-ci.yaml (a "starter" workflow) in this repo for
# an example of what the caller workflow looks like.
name: Sphinx docs CI

on:
workflow_call:
inputs:
docs-directory:
description: >-
Directory containing Makefile. (e.g. docs/)
type: string
required: true

environment-file:
description: >-
Path to conda environment file (e.g. docs/conda.yml)
type: string
required: true

make-target:
description: >-
Sphinx builder name. See https://www.sphinx-doc.org/en/master/man/sphinx-build.html#options
type: string
default: html

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: ${{ inputs.environment-file }}
- run: conda list
- run: make ${{ inputs.make-target }}
Comment thread
victorlin marked this conversation as resolved.
working-directory: ${{ inputs.docs-directory }}
env:
# https://www.sphinx-doc.org/en/master/man/sphinx-build.html
# -n: warn on missing references
# -W: error on warnings
# --keep-going: find all warnings
SPHINXOPTS: -n -W --keep-going
4 changes: 4 additions & 0 deletions workflow-templates/docs-ci.properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "CI for Sphinx docs",
"description": "Basic CI workflow for repos containing a Sphinx documentation project"
}
9 changes: 9 additions & 0 deletions workflow-templates/docs-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Sphinx docs CI

on:
- push
- pull_request

jobs:
ci:
uses: nextstrain/.github/.github/workflows/docs-ci.yaml@master
Comment thread
tsibley marked this conversation as resolved.
3 changes: 3 additions & 0 deletions workflow-templates/pathogen-repo-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ on:
jobs:
ci:
uses: nextstrain/.github/.github/workflows/pathogen-repo-ci.yaml@master
with:
docs-directory: docs/
environment-file: docs/conda.yml