Skip to content

Commit 62fb7eb

Browse files
authored
ci: add API docs workflow (#1110)
1 parent aa16bcf commit 62fb7eb

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/release-automated.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,28 @@ on:
33
push:
44
branches: [ master, release, alpha, beta ]
55
jobs:
6+
publish-docs:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
with:
11+
fetch-depth: 0
12+
- name: Set up JDK 11
13+
uses: actions/setup-java@v2
14+
with:
15+
java-version: '11'
16+
distribution: 'adopt'
17+
- name: Generate Javadoc
18+
run: ./gradlew javadocRelease
19+
- name: Deploy GitHub Pages
20+
uses: JamesIves/[email protected]
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
branch: gh-pages
24+
clean: true
25+
folder: build/docs/javadoc
26+
target-folder: api
27+
dry-run: true
628
release:
729
runs-on: ubuntu-latest
830
outputs:
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Trigger this workflow only to manually publish API docs; this should only be used
2+
# in extraordinary circumstances as this is done automatically as part of the
3+
# automated release workflow.
4+
5+
name: release-manual-docs
6+
on: workflow_dispatch
7+
jobs:
8+
publish-docs:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
- name: Set up JDK 11
15+
uses: actions/setup-java@v2
16+
with:
17+
java-version: '11'
18+
distribution: 'adopt'
19+
- name: Generate Javadoc
20+
run: ./gradlew javadocRelease
21+
- name: Deploy GitHub Pages
22+
uses: JamesIves/[email protected]
23+
with:
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
branch: gh-pages
26+
clean: true
27+
folder: build/docs/javadoc
28+
target-folder: api
29+
dry-run: true

0 commit comments

Comments
 (0)