Skip to content

Commit 8970c14

Browse files
author
Chris Chen
authored
add doxygen (#626)
* add * Update doxygen.yml * Update doxygen.yml
1 parent 38c410e commit 8970c14

2 files changed

Lines changed: 2915 additions & 51 deletions

File tree

.github/workflows/doxygen.yml

Lines changed: 27 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,50 @@
11
name: Generate API reference via Doxygen and push to GitHub Pages
2-
env:
3-
# Specify the doc version to which the API reference belongs
4-
doc_version: 3.6.0
2+
53
on:
6-
push:
7-
branches:
8-
# Remember to update the version number
9-
- master
4+
workflow_dispatch:
5+
inputs:
6+
branch_name:
7+
description: 'Which git branch should I check out?'
8+
required: true
9+
10+
java_version:
11+
description: 'Java SDK version to use for documentation'
12+
required: true
13+
1014

1115
jobs:
1216
build:
1317
runs-on: ubuntu-latest
18+
env:
19+
BRANCH_NAME: ${{ github.event.inputs.branch_name }}
20+
JAVA_VERSION: ${{ github.event.inputs.java_version }}
1421

1522
steps:
1623
- name: Checkout code
1724
uses: actions/checkout@v4
1825
with:
26+
ref: ${{ github.event.inputs.branch_name }}
1927
fetch-depth: 0 # fetch all commits/branches for gitversion
2028

21-
- name: Extract branch name
22-
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
23-
29+
- name: Setup Git config
30+
run: git config user.name ChrisChen2023 && git config user.email chris.chen@vesoft.com
31+
2432
- name: Install Doxygen
2533
run: |
2634
sudo apt-get update
2735
sudo apt-get install -y doxygen graphviz
2836
29-
# Generate HTML files
30-
- name: Generate Documentation
37+
# Generate Java API reference
38+
- name: Generate Documentation for Java
3139
run: |
32-
echo "OUTPUT_DIRECTORY=$BRANCH_NAME" >> doxygen-config
33-
doxygen doxygen-config
34-
40+
echo "PROJECT_NUMBER=${JAVA_VERSION}" >> doxygen/java-config
41+
mkdir -p "${JAVA_VERSION}"
42+
echo "OUTPUT_DIRECTORY=${JAVA_VERSION}" >> doxygen/java-config
43+
doxygen doxygen/java-config
44+
3545
# Deploy the generated HTML files to the gh-pages branch
3646
- name: Deploy to gh-pages
3747
uses: JamesIves/github-pages-deploy-action@v4
3848
with:
39-
folder: ${{ env.BRANCH_NAME }}/html
40-
target-folder: ${{ env.BRANCH_NAME }}
41-
42-
# - name: show gh-pages branch
43-
# run: |
44-
# git branch
45-
# git checkout .
46-
# git checkout gh-pages
47-
48-
# # Compresses HTML files into a tar.gz file
49-
# - name: compress api reference
50-
# run: |
51-
# tar -zcvf $BRANCH_NAME.tar.gz $BRANCH_NAME
52-
53-
# - name: transfer api reference
54-
# uses: appleboy/scp-action@master
55-
# with:
56-
# host: 20.163.77.63
57-
# username: azureuser
58-
# password: ${{ secrets.ENSITE_PASSWORD }}
59-
# port: 404
60-
# source: $BRANCH_NAME.tar.gz
61-
# # Return error if the target doc version does not already exist
62-
# target: /var/www/ent-docs/${{ env.doc_version }}/
63-
64-
# - name: uncompress ap reference
65-
# uses: appleboy/ssh-action@master
66-
# with:
67-
# host: 20.163.77.63
68-
# username: azureuser
69-
# password: ${{ secrets.ENSITE_PASSWORD }}
70-
# port: 404
71-
# script: |
72-
# mkdir -p /var/www/ent-docs/${{ env.doc_version}}/api/java/
73-
# tar -zxf /var/www/ent-docs/${{ env.doc_version}}/$BRANCH_NAME.tar.gz -C /var/www/ent-docs/${{ env.doc_version}}/api/java/
74-
49+
folder: ${{ env.JAVA_VERSION }}/html
50+
target-folder: ${{ env.JAVA_VERSION }}

0 commit comments

Comments
 (0)