forked from algorithm-archivists/algorithm-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
29 lines (25 loc) · 756 Bytes
/
.travis.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
dist: trusty
sudo: false
language: node_js
node_js:
- "12"
before_script:
- export BOOK_BUILD_DIR="${TRAVIS_BUILD_DIR}"/_book
- env | sort
script:
- npm run build
# Make sure the book built.
- |
book_check_file="${BOOK_BUILD_DIR}/index.html"
if [[ ! -f "${book_check_file}" ]]; then
echo "${book_check_file} not found"
exit 1
fi
after_success:
- |
if [[ "${TRAVIS_BRANCH}" == master && "${TRAVIS_PULL_REQUEST}" == false ]]; then
# Commits to master that are not pull requests, that is, only
# actual addition of code to master, should deploy the book to
# the site.
bash "${TRAVIS_BUILD_DIR}"/tools/deploy/update_site_travis.bash
fi