Merge pull request #40 from JeffersonLab/evio-6-dev #291
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Automatic generation of doxygen and javadoc files for Evio's C, C++, and Java code | |
| # on the main (development) branch which will be copied and checked into the gh-pages branch. | |
| name: Documentation generation CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # checkout the main branch | |
| - uses: actions/checkout@v2 | |
| # generate the C doxygen files | |
| - name: Doxygen Action C | |
| uses: mattnotmitt/doxygen-action@v1.3.1 | |
| with: | |
| working-directory: '.' | |
| doxyfile-path: 'doc/doxygen/DoxyfileC' | |
| # generate the C++ doxygen files | |
| - name: Doxygen Action C++ | |
| uses: mattnotmitt/doxygen-action@v1.3.1 | |
| with: | |
| working-directory: '.' | |
| doxyfile-path: 'doc/doxygen/DoxyfileCC' | |
| - name: Install Maven | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y maven | |
| # generate the javadoc files | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v2 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Javadoc Action | |
| run: mvn javadoc:javadoc | |
| # clean up the javadoc files including removing timestamps. OPTIONAL. | |
| - name: Tidy up the javadocs | |
| id: tidy | |
| uses: cicirello/javadoc-cleanup@v1 | |
| with: | |
| path-to-root: doc/javadoc | |
| # store the doc files | |
| - name: Upload Output Directory | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: evio-doc-files | |
| path: doc | |
| retention-days: 1 | |
| copy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| # checkout the gh-pages branch | |
| - uses: actions/checkout@v2 | |
| with: | |
| ref: gh-pages | |
| # download the doc files, most of which are generated above | |
| - name: Download Output Directory | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: evio-doc-files | |
| path: doc-6.0 | |
| # add, commit and push to gh-pages | |
| - name: Commit changes | |
| uses: EndBug/add-and-commit@v7 | |
| with: | |
| author_name: Carl Timmer | |
| author_email: timmer@jlab.org | |
| message: 'Update docs' | |
| branch: gh-pages | |
| add: '["doc-6.0/doxygen/C/html/*", "doc-6.0/doxygen/CC/html/*", "doc-6.0/javadoc/", "doc-6.0/users_guide/evio_Users_Guide.pdf", "doc-6.0/format_guide/evio_Formats.pdf"]' |