Skip to content

Commit

Permalink
Merge pull request #79 from ansys-internal/ci/documentation_worklfow
Browse files Browse the repository at this point in the history
CI: add documentation workflow
  • Loading branch information
svandenb-dev authored Nov 30, 2023
2 parents 5eecead + d948c3f commit f2c9c78
Showing 1 changed file with 66 additions and 0 deletions.
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

0 comments on commit f2c9c78

Please sign in to comment.