Skip to content

Commit d975670

Browse files
committed
chore(ci): Use uv to build docs on Circle
1 parent f8f6ee7 commit d975670

File tree

1 file changed

+9
-30
lines changed

1 file changed

+9
-30
lines changed

.circleci/config.yml

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,14 @@ version: 2.1
22
jobs:
33
build_docs:
44
docker:
5-
- image: cimg/python:3.12-node
5+
- image: cimg/python:3.12
66
steps:
77
# checkout code to default ~/project
88
- checkout
9-
- run:
10-
name: install dependencies
11-
command: |
12-
python -m venv env
13-
source env/bin/activate
14-
python -m pip install --upgrade pip
15-
pip install -r requirements.txt
169
- run:
1710
name: generate docs
1811
command: |
19-
source env/bin/activate
20-
mkdocs build --clean --strict --verbose
12+
uv run mkdocs build --clean --strict --verbose
2113
- persist_to_workspace:
2214
# the mkdocs build outputs are in ~/project/site
2315
root: ~/project
@@ -31,26 +23,16 @@ jobs:
3123
docker:
3224
- image: cimg/python:3.12
3325
steps:
34-
# checkout code to default ~/project
3526
- checkout
3627
- attach_workspace:
37-
# mkdocs build outputs will be in ~/project/site
3828
at: ~/project
39-
- run:
40-
name: install linkchecker
41-
command: |
42-
python -m venv env
43-
source env/bin/activate
44-
python -m pip install --upgrade pip
45-
python -m pip install linkchecker
4629
- run:
4730
name: check links
4831
command: |
49-
source env/bin/activate
5032
git status
5133
if (! git log -1 --pretty=oneline | grep REL:) ; then
5234
chmod a+rX -R ~
53-
linkchecker -t 1 ~/project/site/
35+
uvx linkchecker -t 1 ~/project/site/
5436
# check external separately by pointing to all *html so no
5537
# failures for local file:/// -- yoh found no better way,
5638
linkchecker -t 1 --check-extern \
@@ -75,20 +57,17 @@ jobs:
7557
# checkout code to default ~/project
7658
- checkout
7759
- run:
78-
name: install dependencies
60+
name: install uv
7961
command: |
80-
apt-get update && apt install -y python3-pip python3-venv pandoc
81-
python3 -m venv .venv
82-
source .venv/bin/activate
83-
python3 -m pip install --upgrade pip
84-
python3 -m pip install -r ~/project/requirements.txt
85-
python3 -m pip install ~/project/tools/schemacode/[render]
62+
curl -LsSf https://astral.sh/uv/install.sh | XDG_BIN_HOME=/usr/local/bin sh
8663
- run:
87-
name: install font that works with unicode emojis
88-
command: apt-get update && apt-get install -y fonts-symbola
64+
name: install dependencies
65+
command: |
66+
apt-get update && apt install -y fonts-symbola pandoc
8967
- run:
9068
name: generate pdf version docs
9169
command: |
70+
uv sync
9271
source .venv/bin/activate
9372
cd ~/project/pdf_build_src
9473
bash build_pdf.sh

0 commit comments

Comments
 (0)