Skip to content

Commit cce8251

Browse files
committed
CI: switching to mystmd builds, update artifact redirect
1 parent 91e693d commit cce8251

File tree

1 file changed

+41
-21
lines changed

1 file changed

+41
-21
lines changed

.circleci/config.yml

Lines changed: 41 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,66 @@
11
version: 2.1
22

3-
jobs:
43

4+
jobs:
55
build-docs:
66
docker:
7-
- image: cimg/python:3.12
8-
7+
- image: cimg/python:3.13
98
steps:
10-
- attach_workspace:
11-
at: ~/
12-
139
- checkout
1410

15-
- run:
16-
name: Install CI dependencies
17-
command: python -m pip install --upgrade tox
11+
- restore_cache:
12+
keys:
13+
- node-cache-v1
1814

1915
- restore_cache:
2016
keys:
21-
- jupyter_ch
17+
- pip-cache-{{ checksum "site-requirements.txt" }}
18+
19+
- run:
20+
name: Install Node.js
21+
command: |
22+
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
23+
sudo apt-get install -y nodejs
2224
2325
- run:
24-
name: Build HTML rendering of notebooks
25-
no_output_timeout: 30m
26+
name: Install mystmd
2627
command: |
27-
python -m tox -e py312-buildhtml
28+
npm install mystmd
29+
30+
- run:
31+
name: Install Python dependencies
32+
command: |
33+
python -m pip install --upgrade pip
34+
if [ -f site-requirements.txt ]; then pip install -r site-requirements.txt; fi
35+
36+
- save_cache:
37+
key: node-cache-v1
38+
paths:
39+
- node_modules
2840

2941
- save_cache:
30-
key: jupyter_ch
42+
key: pip-cache-{{ checksum "site-requirements.txt" }}
3143
paths:
32-
- _build/.jupyter_cache
44+
- ~/.cache/pip
45+
46+
- run:
47+
name: Build documentation
48+
environment:
49+
# Ensure this is same as store_artifacts path below
50+
DOCS_PATH: _build/html
51+
command: |
52+
export BASE_URL="/output/job/$CIRCLE_WORKFLOW_JOB_ID/artifacts/0/$DOCS_PATH"
53+
54+
(npx myst build --html)
55+
56+
## Temporary hack to remove unused thebe JS
57+
rm _build/html/*thebe*.js
3358
3459
- store_artifacts:
3560
path: _build/html
3661

37-
- persist_to_workspace:
38-
root: _build
39-
paths:
40-
- html
41-
4262
workflows:
4363
version: 2
44-
default:
64+
build-and-docs:
4565
jobs:
4666
- build-docs

0 commit comments

Comments
 (0)