Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/publish-objectivec-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ jobs:
timeout-minutes: 120
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0

- name: Get vcpkg tool info
id: vcpkg-tool-info
uses: ./.github/actions/get-vcpkg-tool-info

- uses: microsoft/onnxruntime-github-actions/setup-build-tools@d19341fb036c43a947a2c0e4a53ad4d15e10bc5c # v0.0.9
with:
vcpkg-version: ${{ steps.vcpkg-tool-info.outputs.release_tag }}
Expand All @@ -42,11 +44,14 @@ jobs:
add-cmake-to-path: 'true'
disable-terrapin: 'true'

- name: Install Jazzy
run: |
sudo gem install jazzy --version 0.14.3
- name: Install Jazzy and dependencies
env:
BUNDLE_GEMFILE: ./objectivec/docs/Gemfile
run: bundle install

- name: Generate Objective-C docs
env:
BUNDLE_GEMFILE: ./objectivec/docs/Gemfile
run: |
set -e

Expand All @@ -56,7 +61,7 @@ jobs:
"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 \
bundle exec jazzy --config ./objectivec/docs/jazzy_config.yaml \
--clean --output ./_site/docs/api/objectivec
shell: bash

Expand Down
4 changes: 4 additions & 0 deletions objectivec/docs/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "https://rubygems.org"

gem "jazzy", "0.15.4"
gem "mustache", "< 1.1.3" # Work around https://github.com/realm/jazzy/issues/1435.
15 changes: 13 additions & 2 deletions objectivec/docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,23 @@ The API should be documented with comments in the [public header files](../inclu

## Documentation Generation

Documentation generation dependencies are defined in [Gemfile](./Gemfile) and managed with
[Bundler](https://bundler.io/).

The [Jazzy](https://github.com/realm/jazzy) tool is used to generate documentation from the code.

To generate documentation, from the repo root, run:
To install the dependencies, from the repo root, run:

```bash
BUNDLE_GEMFILE=objectivec/docs/Gemfile bundle install
```

Then, to generate the documentation, run:

```bash
jazzy --config objectivec/docs/jazzy_config.yaml --output <output directory>
BUNDLE_GEMFILE=objectivec/docs/Gemfile bundle exec jazzy \
--config objectivec/docs/jazzy_config.yaml \
--output <output directory>
```

The generated documentation website files will be in `<output directory>`.
Expand Down
Loading