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
* Use `make` in build sphinx docs
* Update documentation
* Add commadn to change dir before running `make` in README.md
* Make the use of `make` optional in `build_sphinx_docs`
* Update documentation
* Add `use-make` option in `deploy_sphinx_docs`
Copy file name to clipboardExpand all lines: README.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,11 +101,14 @@ build_sphinx_docs:
101
101
with:
102
102
python-version: 3.10
103
103
check-links: false
104
+
use-make: false
104
105
```
105
106
The `python-version` input is optional and defaults to `3.x` (where `x` is the latest stable version of Python 3 available on the GitHub Actions platform)
106
107
107
108
The `check-links` input is also optional and defaults to `true`. If set to `true`, the action will use the Sphinx linkcheck builder to check the integrity of all **external** links.
108
109
110
+
The `use-make` input is optional and defaults to `false`. If set to `true`, the action will use the `make` utility with a custom `docs/Makefile` to build the pages from `SOURCEDIR` to `BUILDDIR` as defined in the Makefile. If set to `false`, the action will use `sphinx-build` to build the pages from `docs/source` to `docs/build`.
The `use-make` input is optional and defaults to `false`. If set to `true`, the action will assume that the Sphinx documentation is built using `make` and will use the `./docs/build/html` directory as the publish directory. If set to `false`, it will use the `./docs/build/` directory instead.
126
131
127
132
## Full Workflows
128
133
* An example workflow, including linting, testing and release can be found at [example_test_and_deploy.yml](./example_test_and_deploy.yml).
*Checking that external links in the documentation are not broken
10
+
*checking that external links in the documentation are not broken
11
11
* optional, defaults to `true` (i.e. links are checked), see the [warning](#warning) below for more information
12
-
* building the html pages from `docs/source` (should contain Sphinx source files) to `docs/build`
12
+
* building the html pages in one of two ways, by setting the `use-make` input (default: `false`)
13
+
* (default) using `sphinx-build` to build the pages from `docs/source` (should contain Sphinx source files) to `docs/build`
14
+
* (`use-make: true`) using the `make` utility with a custom `docs/Makefile` to build the pages from `SOURCEDIR` to `BUILDDIR` as defined in the Makefile
13
15
* uploading the built html pages as an artifact named `docs-build`, for use in other actions
14
16
15
17
It can be run upon all pull requests, to ensure that documentation still builds.
@@ -22,6 +24,10 @@ You can debug the linkcheck step by running it locally:
22
24
```bash
23
25
sphinx-build docs/source docs/build -b linkcheck
24
26
```
27
+
or, if you have `docs/Makefile`:
28
+
```bash
29
+
cd docs && make linkcheck
30
+
```
25
31
If the linkcheck step produces "false positives" for your project (i.e. marking valid links as broken), you have two options:
26
32
27
33
- Adding the following to `conf.py` (replace with the problematic URLs).
Copy file name to clipboardExpand all lines: deploy_sphinx_docs/README.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,4 +5,9 @@ The docs are then published (by default at `https://<username>.github.io/<repo>/
5
5
The various steps include:
6
6
* Removing any previous builds, if present in `docs/build`
7
7
* downloading the built html pages (artifact named `docs-build`) into the `docs/build` folder (see the [Build Sphinx Docs action](../build_sphinx_docs/README.md))
8
-
* deploying the`html` pages to the `gh-pages` branch. This step uses [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages).
8
+
* deploying the`html` pages to the `gh-pages` branch. This step uses [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages).
9
+
10
+
The `use-make` input is optional and defaults to `false`.
11
+
As this input helps to identify the location of the built documentation for deployment, it should match the `use-make` value specified in the [Build Sphinx Docs action](../build_sphinx_docs/README.md).
12
+
If set to `true`, it is assumed that the documentation is built using `make` and the `./docs/build/html` directory will be used as the publish directory.
13
+
If set to `false`, the `./docs/build/` directory will be used instead.
0 commit comments