@@ -4,30 +4,52 @@ This project implements a GitLab CI/CD template to create intelligent and beauti
## Usage
In order to include this template in your project, add the following to your `gitlab-ci.yml`:
This template can be used both as a [CI/CD component](https://docs.gitlab.com/ee/ci/components/#use-a-component-in-a-cicd-configuration) or using the legacy [`include:project`](https://docs.gitlab.com/ee/ci/yaml/index.html#includeproject) syntax.
| `SPHINX_SOURCE_DIR`| Sphinx source directory (relative to `$SPHINX_PROJECT_DIR`) containing the Sphinx `conf.py` file | `source` |
| `SPHINX_BUILD_DIR`| Sphinx build directory (relative to `$SPHINX_PROJECT_DIR`), the path will be declared as artifact | `build` |
| `SPHINX_REQUIREMENTS_FILE` | Requirements file. If the file is not found in the repository, requirements are read from the `SPHINX_REQUIREMENTS` variable | `requirements.txt` |
| `SPHINX_REQUIREMENTS`| Space separated requirements (ignored if a requirement file is found) | _none_ |
| `source-dir` / `SPHINX_SOURCE_DIR` | Sphinx source directory (relative to `$SPHINX_PROJECT_DIR`) containing the Sphinx `conf.py` file | `source` |
| `build-dir` / `SPHINX_BUILD_DIR` | Sphinx build directory (relative to `$SPHINX_PROJECT_DIR`), the path will be declared as artifact | `build` |
| `requirements-file` / `SPHINX_REQUIREMENTS_FILE` | Requirements file. If the file is not found in the repository, requirements are read from the `SPHINX_REQUIREMENTS` variable | `requirements.txt` |
| `requirements` / `SPHINX_REQUIREMENTS` | Space separated requirements (ignored if a requirement file is found) | _none_ |
| `SPHINX_BUILD_ARGS`| [`sphinx-build` options](https://www.sphinx-doc.org/en/master/man/sphinx-build.html)) to be used in the build job, | `-M html` |
| `build-args` / `SPHINX_BUILD_ARGS` | [`sphinx-build` options](https://www.sphinx-doc.org/en/master/man/sphinx-build.html)) to be used in the build job, | `-M html` |
### `sphinx-lychee` job
This job checks links with [lychee](https://github.com/lycheeverse/lychee). It uses the following variable:
| Name | Description | Default value |
| Input / Variable | Description | Default value |
| `SPHINX_LYCHEE_ENABLED`| Set to `true` to enable this job | _none_ (disabled) |
| `SPHINX_LYCHEE_IMAGE`| The Docker image used to run [lychee](https://github.com/lycheeverse/lychee) | `registry.hub.docker.com/lycheeverse/lychee:latest` |
| `SPHINX_LYCHEE_ARGS`| [lychee arguments](https://github.com/lycheeverse/lychee#commandline-parameters) to execute | `--exclude-loopback $SPHINX_SOURCE_DIR/**/*.rst` |
| `lychee-enabled` / `SPHINX_LYCHEE_ENABLED` | Set to `true` to enable this job | _none_ (disabled) |
| `lychee-image` / `SPHINX_LYCHEE_IMAGE` | The Docker image used to run [lychee](https://github.com/lycheeverse/lychee) | `registry.hub.docker.com/lycheeverse/lychee:latest` |