-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (41 loc) · 1.13 KB
/
build-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build Docs
on:
release:
types: [published]
workflow_dispatch:
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Conda
uses: conda-incubator/setup-miniconda@v2
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