-
Notifications
You must be signed in to change notification settings - Fork 0
/
.readthedocs.yaml
39 lines (31 loc) · 1.44 KB
/
.readthedocs.yaml
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
# IMPORTANT: ReadTheDocs is not our main doc site; GitHub Pages is. This is
# ONLY for PR previews :)
# TODO: The version string is repeated, and there seems to be no current way to
# avoid this. When a way becomes available, use it!
# https://github.com/readthedocs/readthedocs.org/issues/6311
version: 2
build:
os: "ubuntu-22.04"
tools:
python: "mambaforge-22.9"
# TODO: There must be a more readable way to express this...
commands:
# HACK: Install Quarto from tarball
# (https://quarto.org/docs/download/tarball.html)
# TODO: Remove this and install with Quarto once 1.4 is on conda-forge
- "wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.4.534/quarto-1.4.534-linux-amd64.tar.gz"
- "mkdir ~/opt && tar -C ~/opt -xvzf quarto*.tar.gz"
- "mkdir ~/bin && ln -s ~/opt/quarto-1.4.534/bin/quarto ~/bin/quarto"
# Install our deps and source code
- "conda env create"
# HACK: Remove conda-installed Quarto to avoid conflict
- "conda remove -n snow-today quarto"
- "conda run -n snow-today which pip"
# Install our source code
- "conda run -n snow-today pip install --editable ."
# Render site
# TODO: Switch to conda install of Quarto once 1.4 available
- "cd doc && conda run -n snow-today ~/bin/quarto render"
# Put the rendered site in place
- "mkdir --parents $READTHEDOCS_OUTPUT/html/"
- "mv doc/_site/* $READTHEDOCS_OUTPUT/html/."