Merge pull request #406 from lsst/tickets/OPSIM-1146 #174
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 and Upload Docs | |
"on": | |
push: | |
tags: | |
- "*" | |
branches: | |
- "main" | |
pull_request: {} | |
workflow_dispatch: | |
jobs: | |
build_sphinx_docs: | |
name: Build and upload documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
miniforge-variant: Mambaforge | |
channels: conda-forge,defaults | |
use-mamba: true | |
channel-priority: strict | |
show-channel-urls: true | |
- name: configure conda and install requirements | |
shell: bash -l {0} | |
run: | | |
mamba install --quiet --file=requirements.txt | |
mamba install --quiet pip | |
pip install "documenteer[guide]" | |
- name: install rubin_sim | |
shell: bash -l {0} | |
run: | | |
echo `pwd` | |
ls ${{ github.workspace }} | |
python -m pip install . --no-deps | |
- name: Access rubin-sim-data cache | |
id: cache-rs | |
uses: actions/cache@v4 | |
env: | |
cache-name: cached-rubin-sim-data | |
with: | |
path: ~/rubin_sim_data | |
key: ${{ env.cache-name }} | |
restore-keys: | | |
${{ env.cache-name }} | |
- name: Update rubin-sim-data if needed | |
shell: bash -l {0} | |
run: | | |
export RUBIN_SIM_DATA_DIR=~/rubin_sim_data | |
# Download anything that is not current | |
rs_download_data --tdqm_disable --update --dirs "maf,throughputs" | |
- name: check conda and documenteer | |
shell: bash -l {0} | |
run: | | |
conda list | |
- name: build docs | |
shell: bash -l {0} | |
run: | | |
export RUBIN_SIM_DATA_DIR=~/rubin_sim_data | |
cd docs | |
make html | |
- name: upload documentation | |
uses: lsst-sqre/ltd-upload@v1 | |
with: | |
project: "rubin-sim" | |
dir: "docs/_build/html" | |
username: ${{ secrets.ltd_username }} | |
password: ${{ secrets.ltd_password }} | |