Skip to content

Merge pull request #192 from pharmaverse/release #6

Merge pull request #192 from pharmaverse/release

Merge pull request #192 from pharmaverse/release #6

Workflow file for this run

name: Documentation
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/configure-pages@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Install ttf-mscorefonts-installer
run: |
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt-get update && sudo apt-get install ttf-mscorefonts-installer
- name: Install LibreOffice
run: sudo apt-get update && sudo apt-get install libreoffice --no-install-recommends
- name: Install dependencies
run: |
pip install zensical mkdocstrings-python markdown-exec[ansi] griffe-pydantic
pip install pytest pytest-cov pytest-r-snapshot
pip install matplotlib python-docx pypdf
pip install -e '.[all]'
- name: Generate coverage report and deploy site
run: |
pytest --cov=rtflite --cov-report=html:docs/coverage/
# Build the site first to generate all artifacts
zensical build --clean
# Ensure generated artifacts are included
if [ -d "docs/articles/rtf" ]; then
cp -r docs/articles/rtf site/articles/
fi
if [ -d "docs/articles/pdf" ]; then
cp -r docs/articles/pdf site/articles/
fi
- uses: actions/upload-pages-artifact@v4
with:
path: site
- uses: actions/deploy-pages@v4
id: deployment