Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: add documentation workflow #79

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/build_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Documentation Build

on: [pull_request, workflow_dispatch]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
docs-style:
name: Check documentation style
runs-on: ubuntu-latest
steps:
- name: Check documentation style
uses: ansys/actions/doc-style@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
vale-config: "doc/.vale.ini"
vale-version: "2.29.6"

docs_build:
name: Build documentation
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install pyedb with doc dependencies
run: |
pip install .[doc]

- name: Verify that pyedb can be imported
run: python -c "import pyedb"

- name: Retrieve pyedb version
run: |
echo "Pyedb version is: $(python -c "from pyedb import __version__; print(); print(__version__)" | tail -1)"

- name: Install doc build requirements
run: |
sudo apt install graphviz

# Run doc build, without creating the examples directory.
# NOTE: we have to add the examples file here since it won't be created as gallery is disabled on linux.
- name: Documentation Build
run: |
make -C doc clean
mkdir doc/source/examples -p
echo $'Examples\n========' > doc/source/examples/index.rst
make -C doc html SPHINXOPTS="-j auto -w build_errors.txt -N"

# Verify that sphinx generates no warnings
- name: Check for warnings
run: |
python doc/print_errors.py

- name: Upload Documentation
uses: actions/upload-artifact@v3
with:
name: Documentation
path: doc/_build/html
retention-days: 1
Loading