A Drone CI tool to easilly deploy documentation on CodeDoc
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.
 
 
Go to file
Maxime BATISTA 65ff547bc6
Merge pull request 'Conditionally deploy based on the current branch' (#2) from clement.freville2/codefirst-docdeployer:feature/conditional-deploy into master
2 years ago
generators doxygen generator now considerates input path as the used Doxyfile path instead of a path of a folder that contains a Doxyfile file 2 years ago
.drone.yml fixing drone 2 years ago
.gitignore changed doc destination path 2 years ago
Dockerfile Update 'Dockerfile' 2 years ago
README.md Conditionally deploy based on the current branch [CI SKIP] 2 years ago
entrypoint.sh Conditionally deploy based on the current branch [CI SKIP] 2 years ago

README.md

Docdeployer

Usage:

steps:
  - name: swagger-doc
    image: hub.codefirst.iut.uca.fr/maxime.batista/codefirst-docdeployer
    commands:
      - /entrypoint.sh <arguments>

entrypoint.sh

This command generates the documentation and deploys it on your CodeDoc space

Arguments

  • -b --branch [branch] pattern of branch names to deploy
  • -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 !! cannot be absolute !!

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 -b main -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