Skip to content

Merge pull request #143 from ImperialCollegeLondon/dependabot/pip/exe… #103

Merge pull request #143 from ImperialCollegeLondon/dependabot/pip/exe…

Merge pull request #143 from ImperialCollegeLondon/dependabot/pip/exe… #103

Workflow file for this run

name: "Sphinx: Render docs"
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Gather dependencies
run: |
pip install -U pip
pip install -r requirements-dev.txt
pip install .
pip install ipykernel
sudo apt-get install pandoc
- name: Run sphinx-apidoc
run: |
sphinx-apidoc -f -e -M -o docs/source/api pyprobe
- name: Add bibliographies
run: |
python docs/source/_append_footbib.py docs/source
- name: Clean old HTML files
run: |
rm -rf docs/build/html/*
- name: Build HTML
run: |
sphinx-build -b html docs/source docs/build/html
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: html-docs
path: docs/build/html/
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html