You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Default CI to slimfast and add comment control to run other builds. (#669)
# References and relevant issues
Depends on #671
# Description
In #646 new make targets were added
for faster builds that skip certain parts of the process.
In this PR I make them available on CI using a comment:
`napari-bot make <target>`
(add the `@` in front of napari-bot)
Here's the breakdown:
1. circleci/config.yml : Here I add a parameter `make_target` to make
the make target configurable on-run. Default is `slimfast` (no gallery,
no outside stuff, no notebook execution)
2. build_docs.yml : I added this back, as a reusable workflow, so that
there is a build-only workflow that can be run on PR push and triggered
with different make_target. (The build-deploy job needs to use the full
build for obvious reasons). I made it so that this build-only job also
be manually triggered by dispatch. Whether triggered or by manual
dispatch, this workflow accepts a make target, one of: html html-noplot
docs slimfast slimgallery. The default is `slimfast`, so on (every)
push/open of PR it will use `slimfast`, but can be triggered with the
other options. Note: at present the triggered state is not saved, so
push always used the default.
3. build_trigger.yml : This is the workflow that detects PR comment,
checks make target vs a list, and triggers the CircleCI and build_docs
builds with the make target from the comment. It also has a step to
report back that the triggered build_docs workflow finished and provide
a link to the run.
4. build_and_deploy.yml : I modified this to not run on PR push anymore,
because it's a full build -- we do need full build for deployment and
it's triggered by napari/napari as well.
I also modified the PR template to give info on the CI builds, as well
as the contributor guide where we talk about docs building on CI.
Note: I don't think the new features will trigger in this PR, because
it's from a branch.
You should be able to see this in action and test it here in my fork,
where this PR branch is the default branch:
psobolewskiPhD#74
You can see builds triggered by comments from Juan and Carol:
https://github.com/psobolewskiPhD/napari-docs/actions/workflows/build_trigger.yml
Followups:
- have the trigger add a reaction to the comment, so the user knows it
triggered
- have the trigger add a label to the PR and then use the label as
default for subsequent runs (e.g. push ones)
---------
Co-authored-by: Tim Monko <[email protected]>
Co-authored-by: Carol Willing <[email protected]>
Copy file name to clipboardExpand all lines: docs/developers/contributing/documentation/index.md
+27-4Lines changed: 27 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,10 +43,33 @@ or [editing an existing file](https://docs.github.com/en/repositories/working-wi
43
43
on the [napari/docs](https://github.com/napari/docs) GitHub repository.
44
44
It's best if you first [fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) the [napari/docs](https://github.com/napari/docs) repository to your own GitHub account, create a [feature branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository#creating-a-branch), upload/create/edit files through the GitHub web interface, and then [open a pull request from your fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) back to [napari-docs](https://github.com/napari/docs).
45
45
46
-
You will also be able to [preview the documentation](doc_view_ci) as it would appear on [napari.org](https://napari.org/dev) by
47
-
using the `Check the rendered docs here!` action at the bottom of your PR which will go to a preview site on [CircleCI](https://circleci.com/).
48
-
A member of the maintenance
49
-
team will help with updating the [napari.org](https://napari.org/dev) table of contents where necessary (by placing a reference to your new file in [docs/_toc.yml](update-toc)) and making sure your documentation has built correctly.
46
+
When you submit your PR, CI will kick off several jobs, including generation of a preview of
47
+
the documentation. By default, CI will use the `slimfast` build ("make target"), which
48
+
doesn't build any content from outside the `docs` repository or run any `docs` notebook cells.
49
+
This is great for seeing the copy and formatting. If you want to preview other elements,
50
+
you can trigger more complete builds by commenting on the PR with:
51
+
```
52
+
@napari-bot make <target>
53
+
```
54
+
where `<target>` can be:
55
+
-`html` : a full build, just like napari.org live
56
+
-`html-noplot` : a full build, but without the gallery examples from `napari/napari`
57
+
-`docs` : only the content from `napari/docs`, with notebook code cells executed
58
+
-`slimfast` : the default, only the content from `napari/docs`, without code cell execution
59
+
-`slimgallery` : `slimfast`, but also builds the gallery examples from `napari/napari`
60
+
61
+
For more information about these targets see the ["building locally"](build_docs_locally) section
62
+
of the documentation, including the part on [specialized builds](#building-what-you-need).
63
+
64
+
Once the jobs complete you will also be able to [preview the documentation](doc_view_ci) by
65
+
using the `Check the rendered docs here!` action at the bottom of your PR, which will go to a
66
+
preview website on [CircleCI](https://circleci.com/). Alternatively, you can download a zip file
67
+
of [the build artifact](#download-documentation-artifact) and open the html files directly in your browser. For a build triggered by a comment, use
68
+
the "Triggered Docs Artifact Build" link.
69
+
70
+
If needed, a member of the maintenance team will help with updating the [napari.org](https://napari.org/dev)
71
+
table of contents where necessary (by placing a reference to your new file in [docs/_toc.yml](update-toc))
72
+
and making sure your documentation has built correctly.
50
73
51
74
(prerequisites)=
52
75
## Prerequisites for a local setup to contribute to the napari documentation
0 commit comments