Skip to content

Sphinx build

Sphinx build #53

Workflow file for this run

name: Sphinx build
on:
workflow_run:
workflows: ["Release"]
types:
- completed
workflow_dispatch:
env:
HDF5_DISABLE_VERSION_CHECK: 1
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v3
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: dpat
use-mamba: true
- name: Get Date
id: get-date
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash
- name: Cache Conda env
uses: actions/cache@v2
with:
path: ${{ env.CONDA }}/envs
key:
conda-${{ matrix.os }}--${{
steps.get-date.outputs.today }}-${{
hashFiles('environment.yml') }}-${{
env.CACHE_NUMBER }}
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
id: cache
- name: Update environment
run:
mamba env update -n dpat -f environment.yml
if: steps.cache.outputs.cache-hit != 'true'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .["dev"]
- name: Build HTML
run: |
cd docs
make html
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: html-docs
path: docs/build/html/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html