Skip to content

Commit b6cfca1

Browse files
authored
Add CircleCI preview CI (#108)
1 parent 1fa5499 commit b6cfca1

2 files changed

Lines changed: 54 additions & 0 deletions

File tree

.circleci/config.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
version: 2.1
2+
3+
jobs:
4+
build-docs:
5+
docker:
6+
- image: cimg/python:3.12
7+
8+
steps:
9+
- checkout
10+
11+
- restore_cache:
12+
keys:
13+
- pip-cache-v1-{{ checksum "conf.py" }}
14+
- pip-cache-v1-
15+
16+
- run:
17+
name: Install dependencies
18+
command: |
19+
python -m pip install --upgrade pip
20+
pip install sphinx
21+
22+
- save_cache:
23+
key: pip-cache-v1-{{ checksum "conf.py" }}
24+
paths:
25+
- ~/.cache/pip
26+
27+
- run:
28+
name: Build docs
29+
command: |
30+
make html
31+
32+
- store_artifacts:
33+
path: _build/html
34+
35+
workflows:
36+
build-preview:
37+
jobs:
38+
- build-docs
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CircleCI artifact redirector
2+
3+
on:
4+
status: {}
5+
6+
jobs:
7+
circleci_artifact_redirector:
8+
runs-on: ubuntu-latest
9+
if: github.event.context == 'ci/circleci: build-docs'
10+
11+
steps:
12+
- uses: scientific-python/circleci-artifacts-redirector-action@v1
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
artifact-path: 0/_build/html/index.html
16+
circleci-jobs: build-docs

0 commit comments

Comments
 (0)