forked from microsoft/onnxruntime
-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (47 loc) · 1.35 KB
/
publish-java-apidocs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Update Java API Docs
on:
push:
branches:
- main
workflow_dispatch:
jobs:
publish:
name: Generate Java docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Install gradle wrapper
run: |
cd java
gradle wrapper
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
build-root-directory: java
arguments: javadoc
- name: Set commit ID
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- uses: actions/checkout@v2
with:
ref: gh-pages
clean: false
- name: Move API docs into target area
run: |
rm -rf docs/api/java
mv java/build/docs/javadoc docs/api/java
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
branch: gh-pages-pr
base: gh-pages
title: '[Automated]: Update Java API docs'
commit-message: 'Update Java API docs to commit ${{ steps.vars.outputs.sha_short }}'
add-paths: docs/api/java