Skip to content

C API用のzipファイルからmodelディレクトリをなくし、別でmodelダウンロード可能にする #1352

C API用のzipファイルからmodelディレクトリをなくし、別でmodelダウンロード可能にする

C API用のzipファイルからmodelディレクトリをなくし、別でmodelダウンロード可能にする #1352

name: generate API documents
on:
push:
branches:
- main
pull_request:
defaults:
run:
shell: bash
jobs:
generate_api_document:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Rust
uses: ./.github/actions/rust-toolchain-from-file
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: "11"
distribution: "adopt"
- name: Install cargo-binstall
uses: taiki-e/install-action@cargo-binstall
- name: Create a venv
uses: ./.github/actions/create-venv
- name: pip install
run: pip install -r ./crates/voicevox_core_python_api/requirements.txt
- name: mkdir public
run: mkdir -p public/apis/c_api
- name: cp docs/apis/index.html
run: cp docs/apis/index.html public/apis/
- name: cp crates/voicevox_core_c_api/include/voicevox_core.h
run: cp crates/voicevox_core_c_api/include/voicevox_core.h docs/apis/c_api/doxygen/
- name: Generate doxygen document
uses: mattnotmitt/[email protected]
with:
working-directory: "docs/apis/c_api/doxygen"
- name: Build voicevox_core_python_api
run: |
cargo build -p voicevox_core_c_api -vv
maturin develop --manifest-path ./crates/voicevox_core_python_api/Cargo.toml --locked
- name: Generate Sphinx document
run: sphinx-build docs/apis/python_api public/apis/python_api
- name: Generate Javadoc
run: |
(cd crates/voicevox_core_java_api && ./gradlew javadoc)
mkdir -p public/apis/java_api
cp -r crates/voicevox_core_java_api/lib/build/docs/javadoc/* public/apis/java_api
- name: Uplaod api document
uses: actions/upload-pages-artifact@v1
if: ${{ github.ref_name == 'main' }}
with:
path: public
deploy_api_github_pages:
runs-on: ubuntu-latest
needs:
- generate_api_document
permissions:
pages: write
id-token: write
environment:
name: APIドキュメント
url: ${{ steps.api.outputs.page_url }}/apis
if: ${{ github.ref_name == 'main' }}
steps:
- name: Deploy to GitHub pages
id: api
uses: actions/deploy-pages@v1