Skip to content

Commit

Permalink
add_api_ref
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisChen2023 committed Jan 25, 2024
1 parent e32bff7 commit b9b2a59
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 16 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Generate API reference via Doxygen and push to GitHub Pages
env:
# Specify the doc version to which the API reference belongs
doc_version: 3.6.0
on:
push:
branches:
# Remember to update the version number
- release-3.7

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all commits/branches for gitversion

- name: Extract branch name
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV

- name: Install Doxygen
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz
# Generate HTML files
- name: Generate Documentation
run: |
echo "OUTPUT_DIRECTORY=$BRANCH_NAME" >> doxygen-config
doxygen doxygen-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.BRANCH_NAME }}/html
target-folder: ${{ env.BRANCH_NAME }}

# - name: show gh-pages branch
# run: |
# git branch
# git checkout .
# git checkout gh-pages

# # Compresses HTML files into a tar.gz file
# - name: compress api reference
# run: |
# tar -zcvf $BRANCH_NAME.tar.gz $BRANCH_NAME

# - name: transfer api reference
# uses: appleboy/scp-action@master
# with:
# host: 20.163.77.63
# username: azureuser
# password: ${{ secrets.ENSITE_PASSWORD }}
# port: 404
# source: $BRANCH_NAME.tar.gz
# # Return error if the target doc version does not already exist
# target: /var/www/ent-docs/${{ env.doc_version }}/

# - name: uncompress ap reference
# uses: appleboy/ssh-action@master
# with:
# host: 20.163.77.63
# username: azureuser
# password: ${{ secrets.ENSITE_PASSWORD }}
# port: 404
# script: |
# mkdir -p /var/www/ent-docs/${{ env.doc_version}}/api/java/
# tar -zxf /var/www/ent-docs/${{ env.doc_version}}/$BRANCH_NAME.tar.gz -C /var/www/ent-docs/${{ env.doc_version}}/api/java/

27 changes: 11 additions & 16 deletions doxygen → doxygen-config
Original file line number Diff line number Diff line change
Expand Up @@ -42,39 +42,33 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.

PROJECT_NAME = ChrisTest-Java
PROJECT_NAME = NebulaGraph Java Client

# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 3.6.0
PROJECT_NUMBER = release-3.7

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.

PROJECT_BRIEF = "Test doxygen features"
PROJECT_BRIEF =

# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.

PROJECT_LOGO =
PROJECT_LOGO =

# With the PROJECT_ICON tag one can specify an icon that is included in the tabs
# when the HTML document is shown. Doxygen will copy the logo to the output
# directory.

PROJECT_ICON =

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY = /api/java

# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096
# sub-directories (in 2 levels) under the output directory of each output format
Expand All @@ -85,7 +79,7 @@ OUTPUT_DIRECTORY = /api/java
# control the number of sub-directories.
# The default value is: NO.

CREATE_SUBDIRS = NO
CREATE_SUBDIRS = YES

# Controls the number of sub-directories that will be created when
# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every
Expand Down Expand Up @@ -642,7 +636,7 @@ CASE_SENSE_NAMES = SYSTEM
# scope will be hidden.
# The default value is: NO.

HIDE_SCOPE_NAMES = NO
HIDE_SCOPE_NAMES = YES

# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
# append additional text to a page's title, such as Class Reference. If set to
Expand Down Expand Up @@ -949,7 +943,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT =
INPUT = client/src/main/java/com/vesoft/nebula/client

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -1477,7 +1471,7 @@ HTML_DYNAMIC_MENUS = YES
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_DYNAMIC_SECTIONS = NO
HTML_DYNAMIC_SECTIONS = YES

# If the HTML_CODE_FOLDING tag is set to YES then classes and functions can be
# dynamically folded and expanded in the generated HTML source code.
Expand Down Expand Up @@ -1517,7 +1511,7 @@ HTML_PROJECT_COOKIE =
# Minimum value: 0, maximum value: 9999, default value: 100.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_INDEX_NUM_ENTRIES = 100
HTML_INDEX_NUM_ENTRIES = 0

# If the GENERATE_DOCSET tag is set to YES, additional index files will be
# generated that can be used as input for Apple's Xcode 3 integrated development
Expand Down Expand Up @@ -1996,7 +1990,7 @@ EXTRA_SEARCH_MAPPINGS =
# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
# The default value is: YES.

GENERATE_LATEX = YES
GENERATE_LATEX = NO

# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
Expand Down Expand Up @@ -2892,3 +2886,4 @@ MSCGEN_TOOL =
# command).

MSCFILE_DIRS =

0 comments on commit b9b2a59

Please sign in to comment.