Skip to content

documentation

documentation #6

Workflow file for this run

name: documentation
on: [workflow_dispatch]
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniforge-variant: Mambaforge
channels: conda-forge
python-version: ${{ matrix.python-version }}
activate-environment: motbxtest_and_doc
environment-file: envs/motbxtest_and_doc.yml
use-mamba: true
- name: Build environment
run: |
conda activate motbxtest_and_doc
python -m pip install -e .
- name: Sphinx build
run: |
sphinx-build doc _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true