CI/Docs: Add jobs to deploy component docs

This commit is contained in:
David Cermak
2021-11-12 12:01:34 +01:00
parent 23dbdb584e
commit b9ff1e4e12
3 changed files with 40 additions and 2 deletions

35
.github/workflows/build-docs.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: Docs build
on:
push:
branches:
- master
jobs:
docs_build:
name: Docs-Build
runs-on: ubuntu-latest
steps:
- name: Checkout esp-protocols
uses: actions/checkout@master
with:
persist-credentials: false
fetch-depth: 0
- name: Generate docs
run: |
sudo apt-get update
sudo apt-get -y install doxygen clang python3-pip
python -m pip install breathe recommonmark
cd $GITHUB_WORKSPACE/components/esp_modem/docs
./generate_docs
cd $GITHUB_WORKSPACE/docs
touch .nojekyll
echo '<a href="esp_modem/index.html">esp-modem</a>' > index.html
- name: Deploy generated docs
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages
folder: docs

View File

@ -16,7 +16,8 @@ copyright = u'2016 - 2021, Espressif Systems (Shanghai) Co., Ltd'
# for a list of supported languages.
language = 'en'
extensions = ['breathe']
extensions = ['breathe', 'recommonmark']
breathe_projects = {'esp_modem': 'xml'}

View File

@ -17,7 +17,9 @@ cat ../include/generate/esp_modem_command_declare.inc | clang -E -P -xc -I../in
doxygen
# Generate the docs
python -u -m sphinx.cmd.build -b html . html
mkdir -p ../../../docs/esp_modem
python -u -m sphinx.cmd.build -b html . ../../../docs/esp_modem
# Cleanup the doxygen xml's and temporary headers
rm -rf xml esp_modem_api_commands.h esp_modem_dce.hpp cxx_api_links.rst