mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-17 21:10:43 +00:00
### Description <!-- Describe your changes. --> Current API docs workflows are scheduled to run monthly, but artifacts expire after 30 days, which could create issues for 31-day months. Updating to regenerate artifacts every 2 weeks. ### 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. -->
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: Update Objective-C API Docs
|
|
|
|
# Run when the Objective-C API changes or every month so that the artifact does not expire
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- objectivec/**
|
|
schedule:
|
|
- cron: '0 0 1,15 * *'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: "apidocs-objectivec"
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
name: Generate Objective-C API docs
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Jazzy
|
|
run: |
|
|
sudo gem install jazzy --version 0.14.3
|
|
|
|
- name: Generate Objective-C docs
|
|
run: |
|
|
set -e
|
|
|
|
# add commit info to main page of generated docs
|
|
ORT_COMMIT_SHORT="$(git rev-parse --short HEAD)"
|
|
printf "\n%s\n" \
|
|
"This documentation was generated from the ONNX Runtime source at commit ${ORT_COMMIT_SHORT}." \
|
|
>> ./objectivec/docs/main_page.md
|
|
|
|
jazzy --config ./objectivec/docs/jazzy_config.yaml \
|
|
--clean --output ./_site/docs/api/objectivec
|
|
shell: bash
|
|
|
|
- name: Upload new site
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: onnxruntime-objectivec-apidocs
|
|
path: ./_site
|
|
retention-days: 30
|