New testing structure with auto-pipelines generation #188
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: HTTomo docs | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
build-docs-publish: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- name: Checkout repository code | |
uses: actions/checkout@v4 | |
- name: Setup Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: httomo-docs | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: false | |
activate-environment: httomo-docs | |
environment-file: ./docs/source/doc-conda-requirements.yml | |
- name: Install httomo and httomo-backends | |
run: | | |
pip install . --no-deps | |
pip install --no-deps httomo-backends | |
- name: Generate full yaml pipelines using pipeline directives | |
run: | | |
python ./docs/source/scripts/execute_pipelines_build.py | |
- name: Build docs | |
run: sphinx-build -a -E -b html ./docs/source/ ./docs/build/ | |
- name: Publish docs | |
if: github.ref_type == 'tag' || github.ref_name == 'main' | |
run: ghp-import -n -p -f ./docs/build | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |