language : python
sudo: false
env:
  global:
    python: "3.5"
    BUILD_DOCS: true
    BUILD_DOCS_BRANCH: master
    DOCS_SUBDIR: .
    TARGET_DEV_SUBDIR: .
    HTML_SUBDIR: build/html
    DOCS_CONDA_DEPS: "bluesky ophyd xray-vision pyolog metadatastore"
    DOCS_PIP_DEPS: "tqdm sphinx-gallery"

before_install:
  - git clone https://github.com/NSLS-II/nsls2-ci --branch master --single-branch ~/ci_scripts
  - source ~/ci_scripts/install-miniconda.sh

script:
  - |
    if [ $BUILD_DOCS == true ]; then
      source ~/ci_scripts/make-docs.sh
    fi

after_success:
  - |
    if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == 'NSLS-II/docs' && $BUILD_DOCS == true && $TRAVIS_BRANCH == 'master' ]]; then
      echo "Adding encrypted deployment key for uploading docs"
      openssl aes-256-cbc -K $encrypted_a692684451b6_key -iv $encrypted_a692684451b6_iv -in NSLS-II-docs-deploy.enc -out NSLS-II-docs-deploy -d
      eval `ssh-agent -s`
      chmod 600 NSLS-II-docs-deploy
      ssh-add NSLS-II-docs-deploy
      source ~/ci_scripts/push-docs.sh
    fi

language : python
sudo: false
env:
  global:
    python: "3.5"
    BUILD_DOCS: true
    BUILD_DOCS_BRANCH: master
    DOCS_SUBDIR: .
    TARGET_DEV_SUBDIR: .
    HTML_SUBDIR: build/html
    DOCS_CONDA_DEPS: \"bluesky\"
    DOCS_PIP_DEPS: \"sphinx-gallery\"

before_install:
  - git clone https://github.com/NSLS-II/nsls2-ci --branch master --single-branch ~/ci_scripts
  - source ~/ci_scripts/install-miniconda.sh

script:
  - |
    if [ $BUILD_DOCS == true ]; then
      source ~/ci_scripts/make-docs.sh
    fi

after_success:
  - |
    if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == 'NSLS-II/docs' && $BUILD_DOCS == true && $TRAVIS_BRANCH == 'master' ]]; then
      echo "Adding encrypted deployment key for uploading docs"
      openssl aes-256-cbc -K $encrypted_a692684451b6_key -iv $encrypted_a692684451b6_iv -in NSLS-II-docs-deploy.enc -out NSLS-II-docs-deploy -d
      eval `ssh-agent -s`
      chmod 600 NSLS-II-docs-deploy
      ssh-add NSLS-II-docs-deploy
      source ~/ci_scripts/push-docs.sh
    fi

Remove unneeded deps and escape quotes to fix config.
BLD: Remove unneeded deps and escape quotes to fix config.
