File tree Expand file tree Collapse file tree 2 files changed +5
-18
lines changed
Expand file tree Collapse file tree 2 files changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -6,22 +6,10 @@ node_js:
66 - " 12"
77
88before_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
1711script :
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
2614after_success :
2715 - |
Original file line number Diff line number Diff line change 3333
3434GH_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} "
You can’t perform that action at this time.
0 commit comments