ビルドを全通り試さない簡易テストモードを追加する #1020
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 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/doxygen-action@v1.9.4 | |
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: Uplaod api document | |
uses: actions/upload-pages-artifact@v1 | |
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 |