mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-01 03:45:06 +00:00
### Description When API docs workflows fail, we typically don't catch the issue until the most recently generated artifact expires. The current artifact retention is 60 days, so by decreasing to 30 days, we can ensure that we're resolving the workflow failures more quickly. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. -->
50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
name: Update JS API Docs
|
|
|
|
# Run when the JS API changes or every month so that the artifact does not expire
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- js/common/**
|
|
schedule:
|
|
- cron: '0 0 1 * *'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: "apidocs-js"
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
name: Generate JS API docs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 18
|
|
- name: Generate JS docs
|
|
run: |
|
|
cd js/
|
|
npm ci
|
|
cd common/
|
|
npm ci
|
|
npx typedoc
|
|
- name: Log source commit
|
|
run: git rev-parse --short HEAD > js/common/docs/source-version.txt
|
|
- name: Move JS docs into site
|
|
run: |
|
|
rm -rf _site/docs/api/js
|
|
mkdir -p _site/docs/api
|
|
mv js/common/docs _site/docs/api/js
|
|
- name: Upload docs artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: onnxruntime-node-apidocs
|
|
path: _site
|
|
retention-days: 30
|