Skip to content

Commit

Permalink
Merge pull request #877 from OpenGeoscience/website-build
Browse files Browse the repository at this point in the history
Update website build process.
  • Loading branch information
manthey authored Jul 27, 2018
2 parents 74de72c + d001113 commit efae4c0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ install:
# travis moved to "npm ci", but that fails with canvas-prebuilt as it tries
# to install it before node-pre-gyp
- npm install
# Install for the website build
- npm run setup-website

before_script:
- export DISPLAY=:99.0
Expand All @@ -63,6 +65,8 @@ script:
- mkdir _build
- ctest -S cmake/travis_build.cmake -VV || true
- if [ -f _build/test_failed ] ; then false ; fi
# Build the website to ensure that it will pass
- npm run build-website

after_failure:
# Upload test results. First make them smaller with optipng.
Expand All @@ -79,3 +83,11 @@ env:
global:
- secure: JYWs3zJV09uAb7CvX32pADRYTH2XqSGvImNEI6zVFxJxs9r0JsGgyOTz4PPBgs3dv1OjVBXqxu4GD2ZBKeo0Ax13ZnBNVR/BacupBtIwXbxp/FG2lr+WBzE0YnEBhAF/mW5DEkNBWJyLSiBlxYA5QFAAHYwb/GOADl+Z9Qi2FIU=
- secure: on13Ka+3jkLDCXxqzxuT+CY4sPM0Zxfbe9M2F3LE0yhN2ww5vaBKdbTrzEWa0TOlBkM2qQUPAFybjHXfHeRyKpZDlsssjogH8YO5qx4zFRP5ZB9ny39QAqBsfZTuXt2WmOTLEcXkByYXVH8my/8ZqZqofSeBZsZdeauzoLbr0R0=

deploy:
- provider: pages
local-dir: website/public
github-token: $GITHUB_TOKEN
skip-cleanup: true
on:
branch: master
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"docs": "jsdoc --pedantic -d dist/apidocs -r src -c jsdoc.conf.json",
"website": "cd website && npx hexo server",
"setup-website": "cd website && npm install",
"build-website": "npm run build && cp -a dist/built/. website/source/built && npm run build-website-examples && npm run build-website-tutorials && npm run docs && cp -ar dist/data/. website/source/data && cp -ar dist/apidocs/. website/source/apidocs && cd website && npm install && rm -f db.json && npx hexo generate"
"build-website": "npm run build && cp -a dist/built/. website/source/built && npm run build-website-examples && npm run build-website-tutorials && npm run docs && cd dist && find data \\( -name tiles -o -name base-images -o -name '*-hash-stamp' -o -name '*.tgz' \\) -prune -o \\( -print0 \\) | cpio -pmdL0 ../website/source && cp -ar apidocs/. ../website/source/apidocs && cd ../website && npm install && rm -f db.json && npx hexo generate"
},
"keywords": [
"map",
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"hexo": {
"version": "3.4.4"
"version": "3.7.1"
},
"dependencies": {
"hexo": "^3.4.4",
Expand Down

0 comments on commit efae4c0

Please sign in to comment.