mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
### Description Move Linux Github actions to a dedicated pool. Currently the "orttraining-linux-ci-pipeline " is too slow. ### Motivation and Context To speed up the running.
50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
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,15 * *'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: "apidocs-java"
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
name: Generate Java docs
|
|
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up JDK 11
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '11'
|
|
distribution: 'adopt'
|
|
- name: Build with Gradle
|
|
uses: gradle/gradle-build-action@v3
|
|
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@v4
|
|
with:
|
|
name: onnxruntime-java-apidocs
|
|
path: _site
|
|
retention-days: 30
|