mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-21 06:22:21 +02:00
CI/Docs: Generate docs locally before uploading to registry
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
name: Docs build
|
name: Docs and Publish
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -7,7 +7,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docs_build:
|
docs_build:
|
||||||
name: Docs-Build
|
name: Docs-Build-And-Upload
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -24,10 +24,20 @@ jobs:
|
|||||||
python -m pip install breathe recommonmark
|
python -m pip install breathe recommonmark
|
||||||
cd $GITHUB_WORKSPACE/components/esp_modem/docs
|
cd $GITHUB_WORKSPACE/components/esp_modem/docs
|
||||||
./generate_docs
|
./generate_docs
|
||||||
|
mkdir -p $GITHUB_WORKSPACE/docs/esp_modem
|
||||||
|
cp -r html/. $GITHUB_WORKSPACE/docs/esp_modem
|
||||||
cd $GITHUB_WORKSPACE/docs
|
cd $GITHUB_WORKSPACE/docs
|
||||||
touch .nojekyll
|
touch .nojekyll
|
||||||
echo '<a href="esp_modem/index.html">esp-modem</a>' > index.html
|
echo '<a href="esp_modem/index.html">esp-modem</a>' > index.html
|
||||||
|
|
||||||
|
- name: Upload components to component service
|
||||||
|
uses: espressif/github-actions/upload_components@master
|
||||||
|
with:
|
||||||
|
directories: "components/esp_modem"
|
||||||
|
name: "esp_modem"
|
||||||
|
namespace: "espressif"
|
||||||
|
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
|
||||||
|
|
||||||
- name: Deploy generated docs
|
- name: Deploy generated docs
|
||||||
uses: JamesIves/github-pages-deploy-action@4.1.5
|
uses: JamesIves/github-pages-deploy-action@4.1.5
|
||||||
with:
|
with:
|
21
.github/workflows/upload_component.yml
vendored
21
.github/workflows/upload_component.yml
vendored
@ -1,21 +0,0 @@
|
|||||||
name: Push components to Espressif Component Service
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
upload_components:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@master
|
|
||||||
|
|
||||||
- name: Upload components to component service
|
|
||||||
uses: espressif/github-actions/upload_components@master
|
|
||||||
with:
|
|
||||||
directories: "components/esp_modem"
|
|
||||||
name: "esp_modem"
|
|
||||||
namespace: "espressif"
|
|
||||||
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
|
|
||||||
|
|
@ -17,9 +17,7 @@ cat ../include/generate/esp_modem_command_declare.inc | clang -E -P -xc -I../in
|
|||||||
doxygen
|
doxygen
|
||||||
|
|
||||||
# Generate the docs
|
# 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
|
# Cleanup the doxygen xml's and temporary headers
|
||||||
rm -rf xml esp_modem_api_commands.h esp_modem_dce.hpp cxx_api_links.rst
|
rm -rf xml esp_modem_api_commands.h esp_modem_dce.hpp cxx_api_links.rst
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
apk add clang g++ doxygen
|
#!/bin/bash
|
||||||
pip install breathe==4.29.0
|
|
||||||
cd components/esp_modem/docs/
|
apt-get update
|
||||||
|
apt-get -y install doxygen clang python3-pip
|
||||||
|
python -m pip install breathe recommonmark
|
||||||
|
pushd components/esp_modem/docs
|
||||||
./generate_docs
|
./generate_docs
|
||||||
cd ../../..
|
popd
|
||||||
|
Reference in New Issue
Block a user