Documentation and website deployment#
Note
This guide is intended for napari core contributors and is not required reading for regular contributors. If you’re looking for information on how to contribute to the documentation, see Contributing Documentation.
The napari documentation and website sources are spread over three repositories, and these are connected and used to generate the documentation and website through several CI workflows detailed below.
-
Workflow file:
build_docs.yml
job:
build-and-upload
Pulls in sources from
napari/docs
and builds docs locally. Uploads artifacts to this repository (napari/napari
).This is triggered on any push to a branch named ‘docs*’ or tag named ‘v*’, to
napari/napari
. The artifact can be used to check the documentation but is not used for docs deployment.
Workflow file:
deploy_docs.yml
job:
build-napari-docs
Triggers
build_and_deploy.yml
workflow at the napari/docs repo. Waits for results and reports it.This is triggered on any commit to the
main
branch onnapari/napari
(and consequently triggers a new deployment of thenapari.org
website). When the commit is tagged, thebuild_and_deploy.yml
workflow will deploy to the version folder e.g., ‘0.5.4/’.
-
Workflow file:
build_and_deploy.yml
job:
build-and-upload
Pulls in sources from
napari/napari
, builds docs, then uploads as an artifact named ‘html’ to this repository (napari/docs
).This is triggered on every Pull Request and shows up as a “Build & Deploy PR Docs / Build & Uplod Artifact” check on the PR.
job:
deploy
Downloads the artifact from the
build-and-upload
job and deploys the html to GitHub pages at thegh-pages
branch of napari/napari.github.io.Always deploys to the
dev/
folder onnapari.github.io
(version “latest” on the website).Deployment is triggered by any commit to the
main
branch onnapari/docs
(and consequently triggers a new deployment of thenapari.org
website.)
Note that these files are not identical to the
napari/napari
version. -
Contains built documentation files (.html) for all versions in the
gh-pages
branch. Auto-deploys togh-pages
on every commit (which in turn happens on every commit to themain
branches of eithernapari/napari
ornapari/docs
).For every commit to the
gh-pages
branch of this repo, theunversioned_pages.yml
action is triggered and copies the latest contents of the index page and the dev folder over the “stable” version of the documentation. This ensures that both the landing page of the website and the developer documentation, including the contributing guide, are always up to date.
Notes#
CircleCI is set up in both napari/napari
and napari/docs
, but doesn’t deploy
documentation. It serves to test the docs build and to provide documentation
previews for PRs. The relevant configuration files are:
On
napari/napari
:.circleci/config.yml
: builds documentation and stores artifact in the CircleCI platform.github/workflows/circleci.yml
: adds a link to the documentation preview to each PR.
On
napari/docs
:.circleci/config.yml
: builds documentation and stores artifact in the CircleCI platform.github/workflows/circleci.yml
: adds a link to the documentation preview to each PR.