diff --git a/.github/workflows/generate-javadoc.yml b/.github/workflows/generate-javadoc.yml
new file mode 100644
index 000000000..6a7e069c0
--- /dev/null
+++ b/.github/workflows/generate-javadoc.yml
@@ -0,0 +1,40 @@
+name: Generate Javadoc and Update gh-pages
+
+on:
+ pull_request:
+ branches: [ "main" ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Set up JDK
+ uses: actions/setup-java@v3
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ cache: maven
+
+ - name: Build with Maven
+ run: mvn clean install -DskipTests
+
+ - name: Build and generate Javadoc
+ run: mvn javadoc:javadoc
+
+ - name: Deploy to gh-pages
+ run: |
+ git config --global user.name "HamaWhiteGG"
+ git config --global user.email "baisongxx@gmail.com"
+ git checkout --orphan gh-pages
+ git reset --hard
+ git clean -df
+ mv target/site/apidocs/* .
+ git add .
+ git commit -m "Update Javadoc"
+ git push origin gh-pages --force
+ env:
+ GH_TOKEN: ${{ secrets.GH_TOKEN }}
diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml
index 09fa95b25..a1fd7ca11 100644
--- a/.github/workflows/maven-build.yml
+++ b/.github/workflows/maven-build.yml
@@ -6,7 +6,7 @@
# separate terms of service, privacy policy, and support
# documentation.
-name: Java CI with Maven
+name: Maven Build and Test
on:
push:
diff --git a/pom.xml b/pom.xml
index 932786c7c..ea106b9a6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -396,6 +396,15 @@
org.apache.maven.plugins
maven-javadoc-plugin
${maven-javadoc-plugin.version}
+
+ en
+ UTF-8
+ UTF-8
+
+ -J-Duser.language=en
+ -J-Duser.region=US
+
+
attach-javadocs