Skip to content

Commit 22bcf1e

Browse files
authored
Merge pull request #45 from ericmjl/travis-ghpages
first attempt
2 parents e4ca1db + 5016eab commit 22bcf1e

File tree

3 files changed

+552
-2
lines changed

3 files changed

+552
-2
lines changed

.travis.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# This is necessary because matplotlib is involved.
2+
before_script:
3+
- "export DISPLAY=:99.0"
4+
- "sh -e /etc/init.d/xvfb start"
5+
- sleep 5 # give xvfb some time to start
6+
7+
language: python
8+
matrix:
9+
include:
10+
- python: 3.5 # we don't actually use this
11+
env: PYTHON_VERSION=3.6
12+
- python: 3.5 # we don't actually use this
13+
env: PYTHON_VERSION=3.7
14+
# command to install dependencies
15+
install:
16+
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
17+
- bash miniconda.sh -b -p $HOME/anaconda
18+
- export PATH="$HOME/anaconda/bin:$PATH"
19+
- hash -r
20+
- conda config --set always_yes yes --set changeps1 no
21+
- conda update -q conda
22+
- conda config --add channels conda-forge
23+
24+
# Useful for debugging any issues with conda
25+
- conda info -a
26+
27+
# Install Python, py.test, and required packages.
28+
- conda env create -f environment.yml
29+
- source activate bayesian-modelling-tutorial
30+
# This guarantees that the Python version is matrixed.
31+
- conda install python=$PYTHON_VERSION
32+
- python -m ipykernel install --user --name bayesian-modelling-tutorial
33+
# command to run tests
34+
script:
35+
- mkdir -p docs/notebooks
36+
# All notebooks that need to be converted are inside nbconvert_config.py
37+
# We have to call on --execute - without doing so, the execution config
38+
# inside nbconvert_config.py won't run.
39+
- jupyter nbconvert --config nbconvert_config.py --execute --template full
40+
# Build the index page.
41+
- pandoc README.md -o docs/index.html -c static/pandoc.css -s
42+
43+
44+
deploy:
45+
provider: pages
46+
skip-cleanup: true
47+
github-token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
48+
keep-history: true
49+
# We read the master branch
50+
on:
51+
branch: master
52+
# Take the docs/ directory
53+
local-dir: docs
54+
# Publish to the gh-pages branch
55+
target-branch: gh-pages
56+
verbose: true

environment.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ channels:
44
- conda-forge
55
- ericmjl
66
dependencies:
7-
- python=3.6
7+
- python=3.7
88
- jupyter
99
- pymc3
1010
- seaborn
@@ -18,6 +18,9 @@ dependencies:
1818
- scikit-learn
1919
- cython
2020
- nodejs
21+
- pyjanitor
22+
- xarray
23+
- pandoc
24+
- black
2125
- pip:
22-
- pyjanitor
2326
- arviz

0 commit comments

Comments
 (0)