Skip to content

Commit

Permalink
Update CI to build the new docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Fraux authored and Luthaf committed Jun 22, 2020
1 parent 413ddeb commit a0ad563
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 80 deletions.
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ julia:
script:
- julia --check-bounds=yes --inline=no -e 'using Pkg; Pkg.activate("."); Pkg.build("Chemfiles"); Pkg.test("Chemfiles"; coverage=true)'
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" && "${TRAVIS_JULIA_VERSION}" == "1.0" ]]; then
if [[ "${TRAVIS_OS_NAME}" == "linux" && "${TRAVIS_JULIA_VERSION}" == "1.4" ]]; then
julia -e 'using Pkg; Pkg.activate("."); Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'
./scripts/build-docs.sh
fi
- cd ${TRAVIS_BUILD_DIR}
- ./scripts/check_used_functions.py
- ./scripts/check_docs.py

deploy:
# General deploy condition for the latest master
Expand All @@ -30,12 +29,12 @@ deploy:
local_dir: gh-pages
on:
branch: master
condition: "${TRAVIS_OS_NAME} == linux && ${TRAVIS_JULIA_VERSION} == 1.0"
condition: "${TRAVIS_OS_NAME} == linux && ${TRAVIS_JULIA_VERSION} == 1.4"
# Deploy condition for the releases (tags)
- provider: pages
skip_cleanup: true
github_token: $GH_TOKEN
local_dir: gh-pages
on:
tags: true
condition: "${TRAVIS_OS_NAME} == linux && ${TRAVIS_JULIA_VERSION} == 1.0"
condition: "${TRAVIS_OS_NAME} == linux && ${TRAVIS_JULIA_VERSION} == 1.4"
17 changes: 6 additions & 11 deletions scripts/build-docs.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
#!/bin/bash -xe

# Install doc dependencies
cd $TRAVIS_BUILD_DIR
pip install --upgrade --user -r doc/requirements.txt

# Install doc dependencies
julia --check-bounds=yes --inline=no -e 'using Pkg; Pkg.add("Documenter");'

# Get previous documentation
git clone https://github.com/chemfiles/Chemfiles.jl --branch gh-pages gh-pages
rm -rf gh-pages/.git

# Build documentation
cd doc
make html
rm -rf _build/html/.doctrees/ _build/html/.buildinfo
rm -rf _build/html/_static/bootswatch-2.3.2/ _build/html/_static/bootstrap-2.3.2/
shopt -s extglob
cd _build/html/_static/bootswatch-* && rm -rf !(flatly) && cd -
cd ..
julia docs/make.jl

if [[ "$TRAVIS_TAG" != "" ]]; then
mv doc/_build/html/ gh-pages/$TRAVIS_TAG
mv docs/build/ gh-pages/$TRAVIS_TAG
else
rm -rf gh-pages/latest
mv doc/_build/html/ gh-pages/latest
mv docs/build/ gh-pages/latest
fi
65 changes: 0 additions & 65 deletions scripts/check_docs.py

This file was deleted.

0 comments on commit a0ad563

Please sign in to comment.