-
Notifications
You must be signed in to change notification settings - Fork 23
Automatic deployment Doxygen documentation
This tutorial describes how to configure a repository to deploy automatically he documentation generated by Doxygen.
It is derived from the original work of Jeroen de Bruijn
Create an account at Travis CI. Turn on Travis for your repository.
This step provides Travis CI with the ability to deploy to gh-pages without making the required credentials public. The solution for this is to use a personal access token for GitHub and use Travis' encryption support.
- In GitHub, go to settings and Personal access tokens
- Click
Generate a new token
and fill in the description. e.g.<your_repo> Travis CI Documentation
- If the repository is public select as scope
public_repo
. If your repository is private select as scoperepo
- Click
Generate token
- Copy the generated token
- In Travis CI, go to the repository settings
- In the
Environment Variables
section write in theName
fieldGH_REPO_TOKEN
- Past the copied token in the
Value
field - Make sure that the
Display value in build log
is switched off - Click on
Add
git clone https://github.com/user-name/repository-name.git
cd /path/to/repository git checkout --orphan gh-pages git commit -m "First commit" git push origin gh-pages git rm -rf . git commit -m "Clean start" git push origin gh-pages
Switch on the master
branch
git checkout master
and copy in your repository folder the two files:
- Doxyfile, the Doxygen configuration file
- .travis.yml, the Travis CI configuration file
- Readme.md, the description of your repository that will be used as the main page for Doxygen
In the Doxyfile complete the field identified with the #toDo tag
- PROJECT_NAME
- PROJECT_BRIEF
git add . git commit -m "Doxyfile and Travis.yml git push
When you do the push Travis CI automatically start compiling the Doxygen and if, the process terminates without errors, published on the gh-pages branch the Doxygen documentation. Thanks to github pages the documentation will be available online at the address
https://user-name.github.io/repository-name/
Note: The website published by github pages can take a while to appear and refresh changes
An example of a repository that is using this technique is
the resulting website
emarolab.github.io/gesture-based-controller/
Doxygen support by default: C, C++, C#, Objective-C, IDL, Java, VHDL, PHP, Python, Tcl, Fortran, and D. If you do not use Java or Python remember to set to NO
the OPTIMIZE_OUTPUT_JAVA
field in the Doxyfile.
Alessandro Carfì e-mail: [email protected]
This work derived from the original work of Jeroen de Bruijn
