Skip to content

Commit 1b2473d

Browse files
authored
CI: switching circleCI to use new engine and use proxy for artifacts (#273)
* CI: switching circleCI to use new engine and use proxy for artifacts * Renaming workflow to be consistent with other repos
1 parent 6499d1f commit 1b2473d

File tree

2 files changed

+14
-69
lines changed

2 files changed

+14
-69
lines changed

.circleci/config.yml

Lines changed: 12 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,34 @@
1-
# See: https://circleci.com/docs/2.0/language-python/
1+
version: 2.1
22

3-
version: 2
4-
jobs:
53

4+
jobs:
65
build-docs:
7-
working_directory: ~/repo
86
docker:
97
- image: cimg/python:3.13
10-
118
steps:
129
- checkout
1310

1411
- run:
1512
name: Install Python dependencies
1613
command: |
17-
python3 -m venv venv
18-
source venv/bin/activate
19-
pip install --upgrade pip wheel setuptools
20-
pip install -r site/requirements.txt -r requirements.txt
21-
22-
- restore_cache:
23-
keys:
24-
- cache-data
14+
python -m pip install --upgrade pip tox
2515
2616
- run:
27-
name: Build site
28-
no_output_timeout: 30m
17+
name: Build documentation
18+
no_output_timeout: 60m
19+
environment:
20+
# Ensure this is same as store_artifacts path below
21+
DOCS_PATH: _build/html
2922
command: |
30-
# NOTE: blas multithreading behaves badly on circleci
23+
export BASE_URL="/output/job/$CIRCLE_WORKFLOW_JOB_ID/artifacts/0/$DOCS_PATH"
3124
export OMP_NUM_THREADS=1
32-
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
36-
37-
- save_cache:
38-
key: cache-data
39-
paths:
40-
- _data
25+
python -m tox -e py313-buildhtml
4126
4227
- store_artifacts:
43-
path: site/_build/html
44-
45-
- persist_to_workspace:
46-
root: site/_build
47-
paths: html
48-
49-
deploy-docs:
50-
working_directory: ~/repo
51-
docker:
52-
- image: cimg/python:3.13
53-
steps:
54-
- checkout
55-
56-
- attach_workspace:
57-
at: site/_build
58-
59-
- run:
60-
name: install deploy deps
61-
command : |
62-
python3 -m pip install --user ghp-import
63-
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
79-
28+
path: _build/html
8029

8130
workflows:
8231
version: 2
83-
build:
32+
build-and-docs:
8433
jobs:
8534
- build-docs
86-
- deploy-docs:
87-
requires:
88-
- build-docs
89-
filters:
90-
branches:
91-
only: main

.github/workflows/circleci.yml renamed to .github/workflows/circleci-artifacts-redirector.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ jobs:
1111
api-token: ${{ secrets.CIRCLE_TOKEN }}
1212
artifact-path: 0/site/_build/html/index.html
1313
circleci-jobs: build-docs
14+
domain: circle.scientific-python.dev
15+
job-title: "--> Rendering Preview <--"

0 commit comments

Comments
 (0)