Skip to content

Generate API reference via Doxygen and push to GitHub Pages #29

Generate API reference via Doxygen and push to GitHub Pages

Generate API reference via Doxygen and push to GitHub Pages #29

Workflow file for this run

name: Generate API reference via Doxygen and push to GitHub Pages
on:
workflow_dispatch:
inputs:
branch_name:
description: 'Which git branch should I check out?'
required: true
java_version:
description: 'Java SDK version to use for documentation'
required: true
jobs:
build:
runs-on: ubuntu-latest
env:
BRANCH_NAME: ${{ github.event.inputs.branch_name }}
JAVA_VERSION: ${{ github.event.inputs.java_version }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch_name }}
fetch-depth: 0 # fetch all commits/branches for gitversion
- name: Setup Git config
run: git config user.name ChrisChen2023 && git config user.email chris.chen@vesoft.com
- name: Install Doxygen
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz
# Generate Java API reference
- name: Generate Documentation for Java
run: |
echo "PROJECT_NUMBER=${JAVA_VERSION}" >> doxygen/java-config
mkdir -p "${JAVA_VERSION}"
echo "OUTPUT_DIRECTORY=${JAVA_VERSION}" >> doxygen/java-config
doxygen doxygen/java-config
# Deploy the generated HTML files to the gh-pages branch
- name: Deploy to gh-pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ${{ env.JAVA_VERSION }}/html
target-folder: ${{ env.JAVA_VERSION }}