|
@ -6,18 +6,23 @@ on: |
|
|
types: [ opened, edited ] |
|
|
types: [ opened, edited ] |
|
|
|
|
|
|
|
|
jobs: |
|
|
jobs: |
|
|
build-dists: |
|
|
dists-and-docs: |
|
|
runs-on: ubuntu-latest |
|
|
runs-on: ubuntu-latest |
|
|
name: dists |
|
|
strategy: |
|
|
|
|
|
fail-fast: false |
|
|
|
|
|
matrix: |
|
|
|
|
|
python-version: [ '3.8', '3.x' ] |
|
|
|
|
|
|
|
|
|
|
|
name: dists & docs ${{ matrix.python-version }} |
|
|
steps: |
|
|
steps: |
|
|
- uses: actions/checkout@v2 |
|
|
- uses: actions/checkout@v2 |
|
|
with: |
|
|
with: |
|
|
fetch-depth: 0 |
|
|
fetch-depth: 0 |
|
|
|
|
|
|
|
|
- name: Set up CPython |
|
|
- name: Set up CPython ${{ matrix.python-version }} |
|
|
uses: actions/setup-python@v2 |
|
|
uses: actions/setup-python@v2 |
|
|
with: |
|
|
with: |
|
|
python-version: 3.x |
|
|
python-version: ${{ matrix.python-version }} |
|
|
|
|
|
|
|
|
- name: Install dependencies |
|
|
- name: Install dependencies |
|
|
run: | |
|
|
run: | |
|
@ -34,40 +39,33 @@ jobs: |
|
|
name: distributions |
|
|
name: distributions |
|
|
path: dist/* |
|
|
path: dist/* |
|
|
|
|
|
|
|
|
build-docs: |
|
|
- name: Install package |
|
|
runs-on: ubuntu-latest |
|
|
|
|
|
strategy: |
|
|
|
|
|
fail-fast: false |
|
|
|
|
|
matrix: |
|
|
|
|
|
language: [ en, ja ] |
|
|
|
|
|
name: docs (${{ matrix.language }}) |
|
|
|
|
|
steps: |
|
|
|
|
|
- uses: actions/checkout@v2 |
|
|
|
|
|
with: |
|
|
|
|
|
fetch-depth: 0 |
|
|
|
|
|
|
|
|
|
|
|
- name: Set up CPython |
|
|
|
|
|
uses: actions/setup-python@v2 |
|
|
|
|
|
with: |
|
|
|
|
|
python-version: 3.x |
|
|
|
|
|
|
|
|
|
|
|
- name: Install dependencies |
|
|
|
|
|
run: | |
|
|
run: | |
|
|
python -m pip install --upgrade pip setuptools wheel |
|
|
|
|
|
|
|
|
|
|
|
# Install all features |
|
|
|
|
|
pip install -e .[docs,speed,voice] |
|
|
pip install -e .[docs,speed,voice] |
|
|
|
|
|
|
|
|
- name: Build docs |
|
|
- name: Build docs |
|
|
shell: bash |
|
|
shell: bash |
|
|
run: | |
|
|
run: | |
|
|
cd docs && sphinx-build -b html -D language=${SPHINX_LANGUAGE} -a -n -T -W --keep-going . _build |
|
|
cd docs |
|
|
env: |
|
|
|
|
|
SPHINX_LANGUAGE: ${{ matrix.language }} |
|
|
|
|
|
|
|
|
|
|
|
- name: Upload artifacts |
|
|
EXIT_STATUS=0 |
|
|
|
|
|
# Build English docs |
|
|
|
|
|
sphinx-build -b html -D language=en -a -n -T -W --keep-going . _build_en || EXIT_STATUS=$? |
|
|
|
|
|
# Build Japanese docs |
|
|
|
|
|
sphinx-build -b html -D language=ja -a -n -T -W --keep-going . _build_ja || EXIT_STATUS=$? |
|
|
|
|
|
|
|
|
|
|
|
exit ${EXIT_STATUS} |
|
|
|
|
|
|
|
|
|
|
|
- name: Upload EN docs |
|
|
|
|
|
uses: actions/upload-artifact@v2 |
|
|
|
|
|
if: always() |
|
|
|
|
|
with: |
|
|
|
|
|
name: docs-en |
|
|
|
|
|
path: docs/_build_en/* |
|
|
|
|
|
|
|
|
|
|
|
- name: Upload JA docs |
|
|
uses: actions/upload-artifact@v2 |
|
|
uses: actions/upload-artifact@v2 |
|
|
if: always() |
|
|
if: always() |
|
|
with: |
|
|
with: |
|
|
name: docs-${{matrix.language}} |
|
|
name: docs-ja |
|
|
path: docs/_build/* |
|
|
path: docs/_build_ja/* |
|
|