/
config.yml
94 lines (77 loc) · 2.21 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
build_docs:
docker:
- image: texlive/texlive
working_directory: ~/checkout
environment:
PIP_INSTALL: python -m pip install --progress-bar off --upgrade
SPHINX: python -m sphinx -W --keep-going --color
steps:
- checkout
- store_artifacts:
name: Uploading overview page
path: .circleci/artifacts.html
destination: artifacts.html
- run:
name: Installing apt Packages
command: |
apt-get -y update
apt-get install -y --no-install-recommends python3-venv librsvg2-bin binutils pandoc
- restore_cache:
keys:
- v1-deps-{{ .Branch }}-{{ checksum "doc/requirements.txt" }}
# fallbacks
- v1-deps-{{ .Branch }}-
- v1-deps-
- run:
name: Set up venv
command: |
python3 -m venv .venv
echo "source .venv/bin/activate" >> $BASH_ENV
- run:
name: Installing nbsphinx
command: |
$PIP_INSTALL .
- run:
name: Installing doc Dependencies
command: |
$PIP_INSTALL -r doc/requirements.txt
- save_cache:
paths:
- ~/.cache/pip
key: v1-deps-{{ .Branch }}-{{ checksum "doc/requirements.txt" }}
- run:
name: Show pandoc version
command: |
pandoc --version
- run:
name: Building HTML
command: |
$SPHINX -d build/doctrees doc build/html -b html
- store_artifacts:
name: Uploading HTML files
path: build/html
destination: html
- run:
name: Building LaTeX
command: |
$SPHINX -d build/doctrees doc build/latex -b latex
- run:
name: Building PDF
command: |
cd build/latex
latexmk -pdflua
- store_artifacts:
name: Uploading PDF file
path: build/latex/nbsphinx.pdf
destination: nbsphinx.pdf
workflows:
version: 2
build-me-my-docs:
jobs:
- build_docs