Skip to content

Baskerville Docs

Baskerville Docs #16

Workflow file for this run

name: Baskerville Docs
on:
workflow_dispatch:
inputs:
python-version:
default: "3.10"
required: false
type: string
defaults:
run:
shell: bash
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
cd ${{ github.workspace }}/src/docs
pip install -r requirements.txt
- name: Sphinx build
run: |
cd ${{ github.workspace }}/src/docs/source
rm -f *.rst make.bat
cd ${{ github.workspace }}/src
sphinx-apidoc -F -a -o docs/source baskerville
cd ${{ github.workspace }}/src/docs
make html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ github.workspace }}/src/docs/build/html
force_orphan: true