From 1775dd1faab030ac0bb1423225ed698b61c4823d Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Mon, 26 Jul 2021 16:04:20 +0300 Subject: [PATCH] Add ReadTheDocs CI (#5456) --- .github/workflows/docs.yml | 38 ++++++++++++++++++++++++++++++++++++++ docs/source/conf.py | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..6110efda --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,38 @@ +name: ReadTheDocs CI + +on: + push: + branches: + - master + - release/* + paths: + - 'docs/**' + - '.github/workflows/docs.yml' + pull_request: + paths: + - 'docs/**' + - '.github/workflows/docs.yml' + +jobs: + + build-docs: + name: Build ReadTheDocs + runs-on: ubuntu-latest + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Build + run: | + sudo apt update + sudo apt install python3-pip python3-setuptools + # GitHub CI installs pip3 and setuptools outside the path. + # Update the path to include them and run. + PATH=/home/runner/.local/bin:$PATH pip3 install --user -r ./docs/requirements.txt + cd ./docs && PATH=/home/runner/.local/bin:$PATH SPHINXOPTS="-W" make html diff --git a/docs/source/conf.py b/docs/source/conf.py index 0b9b5fce..33b42328 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -56,7 +56,7 @@ exclude_patterns = [] # a list of builtin themes. # html_theme = 'default' -html_logo = 'logo_espressif.png' +html_logo = '_static/logo_espressif.png' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files,