/
config.yml
54 lines (53 loc) · 1.99 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
version: 2
jobs:
build:
branches:
ignore:
- gh-pages
docker:
- image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37
steps:
- checkout
- run:
command: |
sudo -E apt-get -yq update
sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install dvipng texlive-latex-base texlive-latex-extra
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
chmod +x miniconda.sh && ./miniconda.sh -b -p ~/miniconda
export PATH="~/miniconda/bin:$PATH"
conda update --yes --quiet conda
conda create -n testenv --yes --quiet python=3
source activate testenv
conda install --yes pip numpy scipy scikit-learn matplotlib sphinx sphinx_rtd_theme numpydoc pillow keras pandas tensorflow
pip install sphinx-gallery imblearn
pip install .
cd doc
make html
- store_artifacts:
path: doc/_build/html
destination: doc
- store_artifacts:
path: ~/log.txt
- persist_to_workspace:
root: doc/_build/html
paths: .
- attach_workspace:
at: doc/_build/html
- run: ls -ltrh doc/_build/html
- deploy:
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
git config --global user.email $EMAIL
git config --global user.name $USERNAME
git clone $CIRCLE_REPOSITORY_URL out
cd out
git checkout gh-pages || git checkout --orphan gh-pages
git rm -rf .
cp -R ../doc/_build/html/* ./
touch .nojekyll
mkdir .circleci
cp -a ../.circleci/. .circleci/.
git add -A
git commit -m "Automated doc html deployment for branch: $CIRCLE_BRANCH, commit $CIRCLE_SHA1"
git push origin gh-pages
fi