Files
OpenMQTT-Gateway/.github/workflows/manual_docs.yml
T
Florian 5297dff7bb [DOCS] - Generate board documentation automaticaly from platformio.ini (#1405)
* [DOCS] - Generate board documentation automaticaly from platformio.ini

To reduce maintenance effort

* [CI] Differentiate boards from platformio.ini

So that only one line can be commented to use customs environments
2023-01-20 09:04:18 -06:00

41 lines
1.4 KiB
YAML

name: Create and publish documentation
on:
workflow_dispatch:
jobs:
documentation:
runs-on: ubuntu-latest
name: Create the documentation and deploy it to GitHub Pages
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: "14.x"
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.7"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install requests pandas markdown pytablereader tabulate
npm install
- name: get lastest release tag
id: last_release
uses: InsonusK/get-latest-release@v1.0.1
with:
myToken: ${{ github.token }}
view_top: 1
- name: Set version tag from git
run: sed -i "s/version_tag/${{steps.last_release.outputs.tag_name}}/g" docs/.vuepress/config.js
- name: Build documentation
run: |
python ./scripts/generate_board_docs.py
python ./scripts/gen_wu.py ${GITHUB_REPOSITORY}
npm run docs:build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/.vuepress/dist
cname: docs.openmqttgateway.com