Skip to content

Commit ec78102

Browse files
authored
Execute notebooks at documentation generation (#102)
1 parent b4816df commit ec78102

13 files changed

+307
-5187
lines changed

.github/workflows/build.yml

+21-4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ jobs:
4040
if: inputs.build_from_code_artifact != 'true'
4141
uses: actions/checkout@v4
4242

43+
- name: set environment variables
44+
run: |
45+
echo "TODAY=$(date +%Y-%m-%d)" >> $GITHUB_ENV
46+
4347
- name: Download code artifact
4448
id: get_code_artifact
4549
if: inputs.build_from_code_artifact == 'true'
@@ -57,10 +61,23 @@ jobs:
5761
unzip pr_code.zip
5862
rm -f pr_code.zip
5963
60-
- name: Install dependencies
61-
run: |
62-
python -m pip install --upgrade pip
63-
pip install sphinx-book-theme myst-nb sphinx-design nbsphinx sphinxcontrib-bibtex pandas
64+
- name: environment setup
65+
id: env-setup
66+
continue-on-error: true
67+
uses: mamba-org/setup-micromamba@v1
68+
with:
69+
environment-file: environment.yml
70+
cache-environment: true
71+
cache-environment-key: "build-${{env.TODAY}}"
72+
73+
- name: retry environment set up if failed
74+
if: steps.env-setup.outcome == 'failure'
75+
uses: mamba-org/setup-micromamba@v1
76+
with:
77+
download-micromamba: false
78+
environment-file: environment.yml
79+
cache-environment: true
80+
cache-environment-key: "build-${{env.TODAY}}"
6481

6582
- name: make html
6683
run: |

0 commit comments

Comments
 (0)