You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.7 KiB
42 lines
1.7 KiB
# Docdeployer
|
|
|
|
Usage:
|
|
```yml
|
|
steps:
|
|
- name: swagger-doc
|
|
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer
|
|
commands:
|
|
- /entrypoint.sh <arguments>
|
|
```
|
|
|
|
## `entrypoint.sh`
|
|
|
|
This command generates the documentation and deploys it on your CodeDoc space
|
|
|
|
### Arguments
|
|
|
|
- `-l --loc [dir]` location of the documentation sources root - **required**
|
|
- `-t --type [docusaurus|doxygen|swagger]` type of documentation generator to use. - **required**
|
|
- `-d --dest [dir]` path to where to put the documentation outputs in your repository's CodeDoc space - **optional <u>!! cannot be absolute !!</u>**
|
|
|
|
Note !
|
|
For swagger and doxygen, you have to pass the configuration file instead of a directory
|
|
|
|
Usage examples :
|
|
|
|
```
|
|
/entrypoint.sh -l ./documentation/api/api-swagger.yml -t swagger -d api_documentation
|
|
/entrypoint.sh -l ./documentation/app -t docusaurus -d application_documentation
|
|
/entrypoint.sh -l ./src/Doxyfile -t doxygen -d sourcecode_documentation
|
|
```
|
|
|
|
### How to add a custom documentation generator ?
|
|
|
|
The `-t <g>` (`--type <g>`) option lookups for a generator script `<g>`.sh to be present in the `/generators`
|
|
(ex: `--type doxygen` searchs for a `/generators/doxygen.sh` file script).
|
|
You can add your own generator by simply moving your script into the `/generators` folder
|
|
|
|
Furthermore, your generator MUST follow below specifications :
|
|
* Define a `generate()` function that will be called, assuming that `$1` equals to the value passed after `-l` (`--loc`) which is the documentation sources location
|
|
* Define a `GEN_PATH` variable which is the path of generated outputs
|
|
* Place generated outputs in the `GEN_PATH` folder, the caller will then upload generated sources onto the user's CodeDoc space |