Skip to content

Commit ab9f906

Browse files
committed
workflow to build and upload JavaDocs to GitHub Pages
1 parent 3f331de commit ab9f906

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/docs.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
on:
2+
push:
3+
branches: [ $default-branch ]
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: read
8+
pages: write
9+
id-token: write
10+
11+
concurrency:
12+
group: "pages"
13+
cancel-in-progress: false
14+
15+
jobs:
16+
build:
17+
name: Build JavaDocs
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Set up JDK 17
22+
uses: actions/setup-java@v3
23+
with:
24+
java-version: '17'
25+
distribution: 'temurin'
26+
cache: maven
27+
- name: Generate Javadoc
28+
run: mvn -B package --file pom.xml
29+
deploy:
30+
name: Deploy to GitHub Pages
31+
environment:
32+
name: github-pages
33+
url: ${{steps.deployment.outputs.page_url}}
34+
runs-on: ubuntu-latest
35+
needs: build
36+
steps:
37+
- name: Setup Pages
38+
uses: actions/configure-pages@v4
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: target/site/apidocs
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)