Build Docs #48
Workflow file for this run
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: Build Docs | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
build-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Install Conda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-variant: Mambaforge | |
- name: Create Environment | |
shell: bash -l {0} | |
run: | | |
conda env create -n karabo_dev_env -f environment.yaml | |
conda activate karabo_dev_env | |
pip install ".[dev]" | |
- name: Build Docs | |
shell: bash -l {0} | |
run: | | |
conda activate karabo_dev_env | |
python doc/src/examples/combine_examples.py | |
cp -a doc/src/ _build | |
sphinx-apidoc . -o _build | |
make html | |
- name: Archive doc build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docs_built | |
path: _deploy | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: _deploy/html | |
force_orphan: true |