This is an automated email from the ASF dual-hosted git repository.

myui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hivemall.git


The following commit(s) were added to refs/heads/master by this push:
     new aa0591c  Fixed gitbook build
aa0591c is described below

commit aa0591c83d09940298e60c6dea6ab997f6a3a75d
Author: Makoto Yui <[email protected]>
AuthorDate: Thu Apr 22 21:24:33 2021 +0900

    Fixed gitbook build
    
    ## What changes were proposed in this pull request?
    
    Fixed gitbook build
    
    ## What type of PR is it?
    
    Documentation
    
    Author: Makoto Yui <[email protected]>
    
    Closes #236 from myui/fix_gitbook.
---
 bin/build_site.sh          |  3 ++-
 docs/Dockerfile            | 18 ++++++++++++++++++
 docs/README                | 18 ++++++++++++++++++
 docs/gitbook/.node-version |  1 +
 docs/gitbook/book.json     |  4 ----
 5 files changed, 39 insertions(+), 5 deletions(-)

diff --git a/bin/build_site.sh b/bin/build_site.sh
index 022cebf..b59325a 100755
--- a/bin/build_site.sh
+++ b/bin/build_site.sh
@@ -42,13 +42,14 @@ mvn clean site
 # building gitbook userguide
 ##
 
+cd ${HIVEMALL_HOME}/docs/gitbook
+
 if ! [ -x "$(command -v gitbook)" ]; then
   echo "gitbook is not installed .." >&2
   echo "Run 'npm install gitbook-cli -g' to install gitbook" >&2
   exit 1
 fi
 
-cd ${HIVEMALL_HOME}/docs/gitbook
 gitbook install && gitbook build
 cd $HIVEMALL_HOME
 
diff --git a/docs/Dockerfile b/docs/Dockerfile
new file mode 100644
index 0000000..c764938
--- /dev/null
+++ b/docs/Dockerfile
@@ -0,0 +1,18 @@
+FROM node:8-buster-slim
+
+ARG GITBOOK_VERSION=3.2.3
+
+RUN apt-get -y update && \
+    apt-get install --no-install-recommends -y curl git && \
+    npm install --global gitbook-cli && \
+       gitbook fetch ${GITBOOK_VERSION} && \
+       npm cache clear --force && \
+    rm -rf /tmp/*
+
+WORKDIR /srv/gitbook
+
+VOLUME /srv/gitbook /srv/html
+
+EXPOSE 4000 35729
+
+CMD /usr/local/bin/gitbook serve
diff --git a/docs/README b/docs/README
new file mode 100644
index 0000000..7ec93ca
--- /dev/null
+++ b/docs/README
@@ -0,0 +1,18 @@
+# Build image
+
+```sh
+docker build . -t hivemall/gitbook:3.2.2
+```
+
+# Serve gitbook
+Thew assumption that the source is in local build directory.
+
+```sh
+docker run -v $(pwd)/gitbook:/srv/gitbook -p 4000:4000 --rm -it 
hivemall/gitbook:3.2.2
+```
+
+# Build gitbook
+
+```sh
+docker run -v $(pwd)/gitbook:/srv/gitbook -p 4000:4000 --rm -it 
hivemall/gitbook:3.2.2 bash -c "gitbook install && gitbook build"
+```
diff --git a/docs/gitbook/.node-version b/docs/gitbook/.node-version
new file mode 100644
index 0000000..dc08cc7
--- /dev/null
+++ b/docs/gitbook/.node-version
@@ -0,0 +1 @@
+10.24.1
diff --git a/docs/gitbook/book.json b/docs/gitbook/book.json
index a12cd93..afff337 100644
--- a/docs/gitbook/book.json
+++ b/docs/gitbook/book.json
@@ -7,7 +7,6 @@
         "edit-link",
         "github",
         "splitter",
-        "sitemap",
         "etoc",
         "callouts",
         "toggle-chapters",
@@ -35,9 +34,6 @@
         "github": {
             "url": "https://github.com/apache/incubator-hivemall/";
         },
-        "sitemap": {
-            "hostname": "https://hivemall.incubator.apache.org/";
-        },
         "etoc": {
           "mindepth": 1,
           "maxdepth": 3,

Reply via email to