Skip to content

Add additional detail about the site deployment pipeline #812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

willingc
Copy link
Contributor

@willingc willingc commented Aug 1, 2025

References and relevant issues

Relaated to #807, #811, #801

Description

This PR adds additional detail about the deployment pipeline from source files to live website.

Additional headings are added to give the reader a better understanding of the logic flow.

@willingc willingc requested a review from melissawm August 1, 2025 19:21
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Aug 1, 2025
@willingc willingc requested a review from a team August 15, 2025 16:28
Copy link
Member

@melissawm melissawm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @willingc - sorry for the late review! I have questions around how we could organize this, although I love the workflow-centered approach (source -> html -> deployment). Do you have ideas for this organization here?


### From source files to html artifact ([`napari/docs`](https://github.com/napari/docs))

The deployment pipeline begins with the source files found in `napari/docs`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or napari/napari in the case of docstrings and examples.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to clarify. I want to make sure that I understand the actual approach since it's a bit confusing to have docs build/deploy actions spread across 3 repos.

Source files

  • rst/md files in napari/docs
  • docstrings in napari/napari source files
  • examples in napari/napari examples directory

napari/docs actions

What are they specifically doing related to deployment?

napari/napari actions

What are they doing related to deployment?


The reason that I took the workflow approach was I was having difficulty understanding which repo was doing what. There's a bunch of non-typical workflows happening and it's difficult for someone who has plenty of docs experience to follow what is happening with our workflow tooling.

While we can do a local build in napari/docs, it's unclear how the local build differs from the deployed site:

  • versioned / unversioned pages
  • actions and workflow responsibilities across repos
  • differences in Sphinx template locations than a standard Sphinx build

It's totally cool that we're doing something different. My hope is that we can document it for greater clarity for current and future contributors. ❤️

Comment on lines +46 to +47
The html artifact files created by the `build_and_deploy.yml` workflow are not
identical to the html files built by the `napari/napari` workflows.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for my understanding, what is the difference? I may be missing something here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# Note this workflow is also triggered by

This was taken from the existing documentation on https://napari.org/stable/developers/contributing/documentation/docs_deployment.html in this line

Note that these files are not identical to the `napari/napari` version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm not sure what this means? Might be worth removing, I don't remember why this is here and I don't see a reason why the artifact files would be different...

The html artifact files created by the `build_and_deploy.yml` workflow are not
identical to the html files built by the `napari/napari` workflows.
```
### From html artifact to deployment trigger ([`napari/napari`](https://github.com/napari/napari))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like the workflow-focused organization, but I'm not sure if this is clear. The build_docs workflow can be triggered by both the napari/napari or napari/docs repos, and in each case it will clone the other corresponding repo, build and deploy to napari.gihub.io, so I think these items don't cover all options.

The following situations are possible:

  • A commit to napari/napari is made.
    • The build_docs.yml workflow in napari/napari is triggered
    • The napari/docs repo is cloned to napari/napari actions environment
    • html artifacts are generated and pushed to napari.github.io
  • A commit to napari/docs is mae
    • The build_and_deploy.html workflow in napari/docs is triggered
    • The napari/napari repo is cloned to napari/docs actions environment
    • html artifacts are generated and pushed to napari.github.io

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good context and unclear from the existing docs and the workflows in the repos.

A few questions:

The first situation when changes to napari/napari are made.

  1. Are the docs always built?
  2. Or are the docs built and deployed only on changes to examples and/or docstrings?
  3. Are the raw html artifacts that are pushed to napari.github.io, then acted upon by the actions in napari.github.io?

The second situation when commit is made to napari/docs

  1. Are the html files created by the napari/docs actions?
  2. Or does a napari/docs action trigger another action to run in napari/napari?
  3. Same question as Update contributor docs #3 above

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first situation when changes to napari/napari are made.

  1. Are the docs always built? Yes
  2. Or are the docs built and deployed only on changes to examples and/or docstrings? No
  3. Are the raw html artifacts that are pushed to napari.github.io, then acted upon by the actions in napari.github.io? Yes

The second situation when commit is made to napari/docs

  1. Are the html files created by the napari/docs actions? Yes
  2. Or does a napari/docs action trigger another action to run in napari/napari? No, napari/napari gets cloned into the actions environment in napari/docs and the docs are built to generate the html artifacts
  3. Same question as 3. above Yes, same process as with napari/napari, html artifacts are pushed to napari.github.io and the workflows there act on the artifacts

We have considered many different workflows in the past, such as having one single action that would run to build the docs when commits are made to either repo, but if that action lives on one repo it would be harder to detect when changes are made in the other repo, for example. We try to keep the two actions that build docs (in napari/napari and napari/docs) synchronized as much as possible though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify point 3 in both situations:

  • napari/napari action can push raw html artifacts to napari.github.io
  • napari/docs action can puah raw html artifacts to napari.github.io
  • These actions should produce the same raw html artifacts if acting on identical source files. In other words, given the same source files, each action would produce raw html artifacts which are identical.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes exactly - that is my understanding at least!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @melissawm. I will rework this PR later in the week. Thanks for the additional context. I have a couple of ideas to keep it workflow centric but to handle the case that either repo can trigger the push to napari.github.io

Co-authored-by: Melissa Weber Mendonça <melissawm@gmail.com>
@willingc
Copy link
Contributor Author

@melissawm Thanks for the review. I've added some clarifying questions.

@psobolewskiPhD brought up a mystery question in the docs meeting about a docs repo action being canceled by a higher priority action in the napari repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants