Skip to content

Commit 7b75b2c

Browse files
rossbarbsipoczrowanc1
authored
Attempt doc preview with mystjs. (#212)
* Attempt doc preview with mystjs. * Introspect build env vars. * Use BASE_URL Co-authored-by: Rowan Cockett <rowanc1@gmail.com> * Rm debugging step from CCI workflow. --------- Co-authored-by: Brigitta Sipőcz <b.sipocz@gmail.com> Co-authored-by: Rowan Cockett <rowanc1@gmail.com>
1 parent 486426e commit 7b75b2c

File tree

2 files changed

+34
-24
lines changed

2 files changed

+34
-24
lines changed

.circleci/config.yml

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build-docs:
77
working_directory: ~/repo
88
docker:
9-
- image: cimg/python:3.10
9+
- image: cimg/python:3.10-node
1010

1111
steps:
1212
- checkout
@@ -17,7 +17,7 @@ jobs:
1717
python3 -m venv venv
1818
source venv/bin/activate
1919
pip install --upgrade pip wheel setuptools
20-
pip install -r site/requirements.txt -r requirements.txt
20+
pip install -r requirements.txt
2121
2222
- restore_cache:
2323
keys:
@@ -30,52 +30,58 @@ jobs:
3030
# NOTE: blas multithreading behaves badly on circleci
3131
export OMP_NUM_THREADS=1
3232
source venv/bin/activate
33-
# n = nitpicky (broken links), W = warnings as errors,
34-
# T = full tracebacks, keep-going = run to completion even with errors
35-
make -C site/ SPHINXOPTS="-nWT --keep-going" html
33+
# Construct the BASE_URL using the CIRCLE_WORKFLOW_JOB_ID
34+
export BASE_URL="/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/0/_build/html"
35+
36+
# Output the BASE_URL for debugging purposes
37+
echo "BASE_URL is set to $BASE_URL"
38+
39+
# Run your myst build command
40+
myst build --html --execute
3641
3742
- save_cache:
3843
key: cache-data
3944
paths:
4045
- _data
4146

4247
- store_artifacts:
43-
path: site/_build/html
48+
path: _build/html
4449

4550
- persist_to_workspace:
46-
root: site/_build
51+
root: _build
4752
paths: html
4853

4954
deploy-docs:
5055
working_directory: ~/repo
5156
docker:
52-
- image: cimg/python:3.10
57+
- image: cimg/python:3.10-node
5358
steps:
5459
- checkout
5560

5661
- attach_workspace:
57-
at: site/_build
62+
at: _build
5863

5964
- run:
6065
name: install deploy deps
6166
command : |
6267
python3 -m pip install --user ghp-import
6368
64-
- run:
65-
name: configure git
66-
command: |
67-
git config --global user.name "ci-doc-deploy-bot"
68-
git config --global user.email "ci-doc-deploy-bot@nomail"
69-
git config --global push.default simple
70-
71-
- add_ssh_keys:
72-
fingerprints:
73-
5c:54:62:37:75:7f:4d:14:f4:07:82:1c:50:0d:ee:9b
74-
75-
- run:
76-
name: deploy to gh-pages
77-
command: |
78-
ghp-import -n -f -p -m "[skip ci] docs build of $CIRCLE_SHA1" site/_build/html
69+
# TODO!
70+
# - run:
71+
# name: configure git
72+
# command: |
73+
# git config --global user.name "ci-doc-deploy-bot"
74+
# git config --global user.email "ci-doc-deploy-bot@nomail"
75+
# git config --global push.default simple
76+
#
77+
# - add_ssh_keys:
78+
# fingerprints:
79+
# 5c:54:62:37:75:7f:4d:14:f4:07:82:1c:50:0d:ee:9b
80+
#
81+
# - run:
82+
# name: deploy to gh-pages
83+
# command: |
84+
# ghp-import -n -f -p -m "[skip ci] docs build of $CIRCLE_SHA1" site/_build/html
7985
8086
8187
workflows:

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ pandas
77
imageio
88
# For supporting .md-based notebooks
99
jupytext
10+
mystmd
11+
ipykernel
12+
jupyter_server
13+
jupyterlab-myst

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy