-
-
Notifications
You must be signed in to change notification settings - Fork 195
/
Copy pathconfig.yml
95 lines (77 loc) · 2.31 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
95
# See: https://circleci.com/docs/2.0/language-python/
version: 2
jobs:
build-docs:
working_directory: ~/repo
docker:
- image: cimg/python:3.8
steps:
- checkout
- run:
name: Install deps for building atari-py
command: sudo apt-get update && sudo apt-get install -y cmake ffmpeg
- run:
name: Install Python dependencies
command: |
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip wheel setuptools
pip install -r site/requirements.txt -r requirements.txt
- restore_cache:
keys:
- cache-data
- run:
name: Build site
no_output_timeout: 30m
command: |
# NOTE: blas multithreading behaves badly on circleci
export OMP_NUM_THREADS=1
source venv/bin/activate
# n = nitpicky (broken links), W = warnings as errors,
# T = full tracebacks, keep-going = run to completion even with errors
make -C site/ SPHINXOPTS="-nWT --keep-going" html
- save_cache:
key: cache-data
paths:
- _data
- store_artifacts:
path: site/_build/html
- persist_to_workspace:
root: site/_build
paths: html
deploy-docs:
working_directory: ~/repo
docker:
- image: circleci/python:3.8.5-buster
steps:
- checkout
- attach_workspace:
at: site/_build
- run:
name: install deploy deps
command : |
python3 -m pip install --user ghp-import
- run:
name: configure git
command: |
git config --global user.name "ci-doc-deploy-bot"
git config --global user.email "ci-doc-deploy-bot@nomail"
git config --global push.default simple
- add_ssh_keys:
fingerprints:
db:84:df:44:ad:77:d0:aa:2d:81:c9:73:30:9d:21:37
- run:
name: deploy to gh-pages
command: |
ghp-import -n -f -p -m "[skip ci] docs build of $CIRCLE_SHA1" site/_build/html
workflows:
version: 2
build:
jobs:
- build-docs
- deploy-docs:
requires:
- build-docs
filters:
branches:
only: main