forked from microsoft/onnxruntime
-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (46 loc) · 1.23 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
49
50
name: Update Java API Docs
# Run when the Java API changes or every month so that the artifact does not expire
on:
push:
branches:
- main
paths:
- java/**
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:
concurrency:
group: "apidocs-java"
cancel-in-progress: false
permissions:
contents: write
jobs:
build:
name: Generate Java docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
build-root-directory: java
gradle-executable: java/gradlew
arguments: javadoc
- name: Log source commit
run: git rev-parse --short HEAD > java/build/docs/javadoc/source-version.txt
- name: Move Java docs into site
run: |
rm -rf _site/docs/api/java
mkdir -p _site/docs/api
mv java/build/docs/javadoc _site/docs/api/java
- name: Upload new site
uses: actions/upload-artifact@v3
with:
name: onnxruntime-java-apidocs
path: _site
retention-days: 60