File tree 2 files changed +5
-18
lines changed
2 files changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -6,22 +6,10 @@ node_js:
6
6
- " 12"
7
7
8
8
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
16
10
17
11
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
25
13
26
14
after_success :
27
15
- |
Original file line number Diff line number Diff line change @@ -33,14 +33,13 @@ git config user.email "travis@travis-ci.org"
33
33
34
34
GH_REPO_REF=" github.com/${DOCS_REPO_OWNER} /${DOCS_REPO_NAME} .git"
35
35
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.
38
37
39
- if [ -d build ]; then
38
+ if [ -d " ${BOOK_BUILD_DIR} " ]; then
40
39
echo " ${bold} Cloning the website repo...${normal} "
41
40
git clone -b " ${DOCS_BRANCH_NAME} " https://git@" ${GH_REPO_REF} "
42
41
rm -rf ./" ${DOCS_REPO_NAME} " /*
43
- cp -a ./build /* ./" ${DOCS_REPO_NAME} "
42
+ cp -a " ${BOOK_BUILD_DIR} " /* ./" ${DOCS_REPO_NAME} "
44
43
pushd ./" ${DOCS_REPO_NAME} "
45
44
echo " www.algorithm-archive.org" > CNAME
46
45
echo " ${bold} Adding changes...${normal} "
You can’t perform that action at this time.
0 commit comments