Skip to content

Merge pull request #5974 from YuzhuWang-code/fix_bug_gradient_truncat… #20

Merge pull request #5974 from YuzhuWang-code/fix_bug_gradient_truncat…

Merge pull request #5974 from YuzhuWang-code/fix_bug_gradient_truncat… #20

Workflow file for this run

name: publish doc
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
get_labels:
runs-on: ubuntu-latest
outputs:
is_doc: ${{ steps.check-labels.outputs.is_doc }}
steps:
- name: Get PR labels
id: pr-labels
uses: joerick/[email protected]
- name: Check whether PR is related to documentation
id: check-labels
run: |
if [ -n "$GITHUB_PR_LABEL_DOCUMENTATION" ]; then
echo "is_doc=true" >> "$GITHUB_OUTPUT"
else
echo "is_doc=false" >> "$GITHUB_OUTPUT"
fi
generate_and_deplay_doc:
runs-on: ubuntu-latest
needs: get_labels
if: |
github.event_name != 'pull_request' ||
(github.event.pull_request.draft == false && needs.get_labels.outputs.is_doc == 'true')
steps:
- uses: actions/checkout@master
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('**/setup.py') }}
- uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: "x64"
- name: check OS
run: cat /etc/os-release
- name: install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq -y cmake python3-dev git pandoc ffmpeg bc nodejs npm
- name: install espnet
env:
ESPNET_PYTHON_VERSION: 3.10
TH_VERSION: 2.0.1
CHAINER_VERSION: 6.0.0
USE_CONDA: false
run: ./ci/install.sh
- name: generate doc
run: ./ci/doc.sh
- name: deploy
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist