Merge pull request #36 from EATRIS/docsupdate #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: documentation | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'doc/**' | |
- 'src/**' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout repository | |
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: '3.11' | |
activate-environment: motbxtools_doc | |
environment-file: envs/motbxtools_doc.yml | |
use-mamba: true | |
- name: Build environment | |
run: | | |
conda activate motbxtools_doc | |
python -m pip install -e . | |
- name: Sphinx build | |
run: | | |
sphinx-build doc _build | |
- name: Deploy documentation to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: _build/ | |
force_orphan: true |