Skip to content

Commit 5754f1f

Browse files
committed
Added a separate workflow file to run javadoc publishing on GitHub pages
1 parent 4ff1317 commit 5754f1f

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed
File renamed without changes.

.github/workflows/javadoc-publish.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build and Deploy Javadocs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
name: Build Javadocs
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up JDK 17
19+
uses: actions/setup-java@v4
20+
with:
21+
java-version: 17
22+
distribution: 'temurin'
23+
24+
- name: Install dependencies and generate Javadocs
25+
run: mvn clean install -B -q -Dgpg.skip=true javadoc:javadoc javadoc:jar
26+
27+
# Upload the Javadocs as an artifact to be deployed
28+
- name: Upload Javadocs Artifact
29+
uses: actions/upload-pages-artifact@v3
30+
with:
31+
path: target/reports/apidocs
32+
33+
deploy:
34+
name: Deploy Javadocs to GitHub Pages
35+
36+
runs-on: ubuntu-latest
37+
needs: build
38+
39+
permissions:
40+
pages: write
41+
id-token: write
42+
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)