Skip to content

matplotlib 3.4 hotfix #141

matplotlib 3.4 hotfix

matplotlib 3.4 hotfix #141

Workflow file for this run

name: Documentation check
on: [pull_request]
jobs:
docs-checks:
name: ${{ matrix.doc-type }}
strategy:
matrix:
doc-type: [html, latex, epub]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Setup Linux Environment
run: |
sudo apt-get install libglu1
- name: Install docs dependencies
run: |
python -m pip install -r docs/requirements.txt
- name: Install package
run: |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e .
- name: Build ${{ matrix.doc-type }} documentation
run: sphinx-build -Wnb ${{ matrix.doc-type }} docs/source/ docs/build-${{ matrix.doc-type }}/
- name: Prepare documentation artifact
run: |
# Define Path to Upload
if [ "${{ matrix.doc-type }}" = html ]; then echo "art_path=docs/build-html" >> $GITHUB_ENV; fi
if [ "${{ matrix.doc-type }}" = latex ]; then echo "art_path=docs/build-latex/MicroStructPy.pdf" >> $GITHUB_ENV; fi
if [ "${{ matrix.doc-type }}" = epub ]; then echo "art_path=docs/build-epub/MicroStructPy.epub" >> $GITHUB_ENV; fi
# Build PDF
if [ "${{ matrix.doc-type }}" = latex ]; then sudo apt install texlive-fonts-recommended; fi
if [ "${{ matrix.doc-type }}" = latex ]; then sudo apt install texlive-latex-recommended; fi
if [ "${{ matrix.doc-type }}" = latex ]; then sudo apt install texlive-lang-english; fi
if [ "${{ matrix.doc-type }}" = latex ]; then sudo apt install texlive-xetex; fi
if [ "${{ matrix.doc-type }}" = latex ]; then sudo apt install latexmk; fi
if [ "${{ matrix.doc-type }}" = latex ]; then cd docs/build-latex; fi
if [ "${{ matrix.doc-type }}" = latex ]; then make; fi
if [ "${{ matrix.doc-type }}" = latex ]; then cd -; fi
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: microstructpy_${{ matrix.doc-type }}_documentation
path: ${{ env.art_path }}