7/28/2023 0 Comments Doxygen list# Before this script is used there should already be a gh-pages branch in the # repository. # For information on how to encrypt variables for Travis CI please go to # or # For information on how to create a clean gh-pages branch from the master # branch, please go to # This script will generate Doxygen documentation and push the documentation to # the gh-pages branch of a repository specified by GH_REPO_REF. # - GH_REPO_TOKEN : Secure token to the github repository. # - GH_REPO_REF : The GitHub reference to the repository. # - GH_REPO_NAME : The name of the repository. # - DOXYFILE : The Doxygen configuration file. # - TRAVIS_COMMIT : The commit that the current build is testing. # Required global variables: # - TRAVIS_BUILD_NUMBER : The number of the current build. See below for mor info on hoe to # create a gh-pages branch. # - An gh-pages branch should already exist. # - Doxygen configuration file must have the destination directory empty and # source code directory with a $(TRAVIS_BUILD_DIR) prefix. _AUTHOR_= "Francesco Romano " # Preconditions: # - Packages doxygen doxygen-doc doxygen-gui graphviz # must be installed. #!/bin/sh # Title : generateDocumentation.sh # Date created : 2017 # Notes : original script from Jeroen de Bruijn The script to load the ssh key in travis is the following You have to add to the repository only the encrypted private key. The command line utility should have already updated your repository settings in Travis, by adding the encrypted variables. The easiest way it to use the Travis Command line tools and follow this guide.įollow the printed instructions. Once we added the new key, we have to encrypt (to increase the security) and to give to Travis the private key. To add a new deploy key to your repository follow these instructions. We chose to use the GitHub deploy keys as they are not tied to a particular user but only to a single repository. There are multiple options to give Travis push permissions on the repository. See Generate the documentation for details on the script. ci/generateDocumentation.sh is the script which actually calls doxygen. We discuss how to setup SSH for Travis in Setup SSH use for Travis. ci/setup-ssh.sh is needed to manage authentication in Travis (as Travis needs to push on the repository the generated documentation). In the previous lines two additional scripts located in the. Note that once a PR is accepted, it always generates a commit on the destination branch This is used to use only one travis job to build the documentation in case a build matrix is present the user-defined variable TRAVIS_BUILD_DOCS must be defined.the branch must be master (for now multiple versions docs are not supported).Note that the if statement checks three conditions: ci/generateDocumentation.sh || travis_terminate 1 fi >- if ] then cd $PROJECT_DIR_ABS source. # Generate the docs only if master, the travis_build_docs is true and we can use secure variables If your doxygen configuration generates the html docs in html folder, the following index.html should be ok. gitignore file, possibly different from the one in the master branch of your project, and the index.html file which will point to the documentation. Now create the permanent files (the ones which will not be overwritten by the automatic documentation procedure). The following command will clean the working area. If your project is not a newly created project you probably already have tracked files. In your git project folder create a new empty branch called gh-pages on your repository. Let's start ✨ Creating the infrastructure Then, we will dig into how we can use doxygen to generate the documentation. Further, the static documentation might be composed of many products (sometimes images), thus it would be worth saving space on the repository by not retaining any history for those files.įirst off, we explain how to create the infrastructure for the documentation using git and keep it up-to-date throughout the changes the code undergoes. The branch must contain at the root level the index.html file pointing to the static documentation (generally generated via doxygen) stored somewhere within the branch itself. A clean and handy way to deal with your documentation is to exploit the GitHub Pages, which represents a nice tool to publish software documentation online.Įverything is basically done through the special branch called gh-pages.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |