File: docs_build.yml

package info (click to toggle)
orsopy 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,780 kB
  • sloc: python: 38,554; makefile: 78
file content (43 lines) | stat: -rw-r--r-- 1,351 bytes parent folder | download
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 and Deploy Docs

on:
  push:
    tags:
      - "v*"

  workflow_dispatch:        # Un comment line if you also want to trigger action manually

jobs:
  sphinx_docs_to_gh-pages:
    runs-on: ubuntu-latest
    name: Sphinx docs to gh-pages
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Make conda environment
        uses: conda-incubator/setup-miniconda@v3
        with:
          python-version: "3.10"    # Python version to build the html sphinx documentation
          environment-file: docs_env.yaml    # Path to the documentation conda environment
          auto-update-conda: false
          auto-activate-base: false
          show-channel-urls: true
      - name: Installing the library
        shell: bash -l {0}
        run: |
          python setup.py install
      - name: Generate coverage report
        shell: bash -l {0}
        run: |
          python -m pip install coverage
          coverage run -m pytest
          coverage html -d docs/_build/html/coverage
      - name: Running the Sphinx to gh-pages Action
        uses: uibcdf/action-sphinx-docs-to-gh-pages@v2.1.0
        with:
          branch: main
          dir_docs: docs
          sphinx-apidoc-opts: '--separate -o . ../'
          sphinx-apidoc-exclude: '../*setup* ../*.ipynb'
          sphinx-opts: ''