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
Copy file name to clipboardExpand all lines: .github/workflows/README.md
+15-4Lines changed: 15 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,12 +44,23 @@ The [docs](./build.yml#L124) job:
44
44
45
45
- creates a `miniconda` environment from [requirements-test.yml](../../scripts/requirements-test.yml) and [docs_environment.yml](../../docs/docs_environment.yml)
46
46
-`cmake` builds & installs CIL into the `miniconda` environment
47
-
- builds the HTML documentation with `sphinx`
47
+
+ builds the HTML documentation with `sphinx`
48
+
- installs ruby dependencies from [`Gemfile`](../../docs/Gemfile)
49
+
+ builds the HTML landing page with `jekyll`
48
50
- uploads a `DocumentationHTML` artifact (which can be downloaded to view locally for debugging)
49
-
- pushes the HTML documentation to the `gh-pages` branch
50
-
+ only if pushing to `master` or tagging (skipped if pushing to a branch or a PR)
51
+
+ pushes the HTML documentation to the `gh-pages` branch
52
+
* only if pushing to `master` or tagging (skipped if pushing to a branch or a PR)
51
53
52
54
> [!TIP]
53
55
> The `docs` job builds the documentation and uploads it as an artifact called `DocumentationHTML`.
54
56
> It can be found by going to the "Actions" tab, and selecting the appropriate run of `.github/workflows/build.yml`, or by clicking on the tick on the action in the "All checks have passed/failed" section of a PR. When viewing the "Summary" for the run of the action, there is an "Artifact" section at the bottom of the page.
55
-
> Clicking on `DocumentationHTML` allows you to download a zip folder containing the built HTML files. This allows you to preview the documentation site before it is published.
57
+
> Click on `DocumentationHTML` to download a zip archive of the built HTML files.
58
+
> It must be extracted into a `CIL` subfolder to properly render locally:
59
+
>
60
+
> ```sh
61
+
> mkdir CIL
62
+
> unzip -d CIL DocumentationHTML.zip
63
+
> python -m http.server
64
+
>```
65
+
>
66
+
> Then open a browser and navigate to <http://localhost:8000/CIL/> to view the documentation.
Copy file name to clipboardExpand all lines: docs/source/developer_guide.rst
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,9 @@ Rendered
88
88
Building documentation locally
89
89
------------------------------
90
90
91
-
The easiest way to test changes to documentation is to build the docs locally. To do this, you will need a working ``cil`` installation.
91
+
The easiest way to test documentation changes is to open a pull request and `download the rendered documentation from the CI <https://github.com/TomographicImaging/CIL/blob/master/.github/workflows/README.md>`_.
92
+
93
+
Alternatively, to build the docs locally, you will need a working ``cil`` installation.
92
94
For development of the documentation embedded within the source code itself (e.g. docstrings), you should build ``cil`` from source.
93
95
94
96
The following steps can be used to create an environment that is suitable for building ``cil`` and its documentation, and to start
@@ -98,8 +100,10 @@ a HTTP server to view the documentation.
98
100
#. Update conda with ``conda update -n base -c defaults conda``
99
101
#. Follow the instructions `here <https://github.com/TomographicImaging/CIL/tree/master#building-cil-from-source-code>`_ to create a conda environment and build ``cil`` from source
100
102
#. Go to ``docs`` folder
101
-
#. Install packages from ``docs/docs_environment.yml``
102
-
#. Build the documentation with ``make dirhtml``
103
+
#. Install packages from ``docs_environment.yml``
104
+
#. [Install Ruby version 3.2](https://www.ruby-lang.org/en/documentation/installation/#installers)
105
+
#. Install the web dependencies with ``make web-deps``
106
+
#. Build the documentation with ``make dirhtml web``
103
107
#. Start an HTTP server with ``make serve`` to access the docs via `localhost:8000 <http://localhost:8000>`_.
104
108
105
109
Example:
@@ -114,7 +118,8 @@ Example:
114
118
cd docs
115
119
conda update -n base -c defaults conda
116
120
conda env update -f docs_environment.yml # with the name field set to ENVIRONMENT_NAME
117
-
make dirhtml serve
121
+
make web-deps # install dependencies (requires ruby 3.2)
0 commit comments