Add Support For LaTeX in Docs (#125) #31
This file contains 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
name: Build and Deploy Javadoc | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
# 1) Build the Javadoc and upload as artifact | |
build-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4.2.2 | |
# 1.1) Setup Java | |
- name: Set up JDK 23 | |
uses: actions/setup-java@v4.7.0 | |
with: | |
distribution: 'zulu' | |
java-version: 23 | |
# 1.2) Setup python | |
- name: Set up Python | |
uses: actions/setup-python@v5.4.0 | |
with: | |
python-version: '3.x' | |
# 1.3) Build Javadoc | |
- name: Build Javadoc | |
run: | | |
mvn clean install -DskipTests | |
mvn javadoc:javadoc \ | |
-Dmaven.javadoc.failOnError=false \ | |
-Dmaven.javadoc.skip=false | |
# 1.5) Find and convert all specified HTML equations to LaTeX equations and inject MathJax script | |
- name: Convert LaTeX | |
run: python scripts/convert_latex.py | |
# 1.6) Upload generated docs as artifact | |
- name: Upload Pages Artifact | |
uses: actions/upload-pages-artifact@v3.0.1 | |
with: | |
path: target/reports/apidocs | |
# 2) Deploy the artifact to GitHub Pages | |
deploy-docs: | |
needs: build-docs | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write # required | |
id-token: write # required | |
steps: | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v4.0.5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} |