Skip to content

Setup PyPI publish action #36

Setup PyPI publish action

Setup PyPI publish action #36

Workflow file for this run

name: Test sphinx docs build
env:
CLONE_PATH: ${{ github.workspace }}
HTML_DOCS: ${{ github.workspace }}/docs/build_html
PDF_DOCS: ${{ github.workspace }}/docs/build_pdf
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra latexmk
sudo apt-get -y install pandoc
- name: Setup base Python environment
run: |
$CLONE_PATH/.github/workflows/setup_base_python.sh ${{ runner.os }}
- name: Build Sphinx documentation
run: |
pushd $CLONE_PATH
tox -r -e html,pdf
popd
- name: Archive Sphinx-based documentation
uses: actions/upload-artifact@v4
with:
name: documentation
path: |
${{ env.HTML_DOCS }}
${{ env.PDF_DOCS }}