Skip to content

Commit dd3e327

Browse files
authored
Update Travis for HonKit build (#728)
* Update Travis for HonKit build * Fix HonKit build commands and location of book build dir
1 parent 2bfcd8b commit dd3e327

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

.travis.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,10 @@ node_js:
66
- "12"
77

88
before_script:
9-
- mkdir -p "${TRAVIS_BUILD_DIR}"/build
10-
- CHANGED_FILES=$(git diff --name-only HEAD~1...HEAD .)
11-
- |
12-
if echo $CHANGED_FILES | grep "package.json"
13-
then
14-
cp package.json "${TRAVIS_BUILD_DIR}"/build
15-
fi
9+
- BOOK_BUILD_DIR="${TRAVIS_BUILD_DIR}"/_book
1610

1711
script:
18-
- |
19-
if echo $CHANGED_FILES | grep "package.json"
20-
then
21-
npm build --reload . ${TRAVIS_BUILD_DIR}/build
22-
else
23-
npm build . ${TRAVIS_BUILD_DIR}/build
24-
fi
12+
- npm run build
2513

2614
after_success:
2715
- |

tools/deploy/update_site_travis.bash

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,13 @@ git config user.email "travis@travis-ci.org"
3333

3434
GH_REPO_REF="github.com/${DOCS_REPO_OWNER}/${DOCS_REPO_NAME}.git"
3535

36-
# Assume the book has already been built, and was moved to `build/`
37-
# inside the same directory as this script.
36+
# Assume the book has already been built and lives in $BOOK_BUILD_DIR.
3837

39-
if [ -d build ]; then
38+
if [ -d "${BOOK_BUILD_DIR}" ]; then
4039
echo "${bold}Cloning the website repo...${normal}"
4140
git clone -b "${DOCS_BRANCH_NAME}" https://git@"${GH_REPO_REF}"
4241
rm -rf ./"${DOCS_REPO_NAME}"/*
43-
cp -a ./build/* ./"${DOCS_REPO_NAME}"
42+
cp -a "${BOOK_BUILD_DIR}"/* ./"${DOCS_REPO_NAME}"
4443
pushd ./"${DOCS_REPO_NAME}"
4544
echo "www.algorithm-archive.org" > CNAME
4645
echo "${bold}Adding changes...${normal}"

0 commit comments

Comments
 (0)