Skip to content

Instantly share code, notes, and snippets.

@sanhuang
Last active April 24, 2020 08:32
Show Gist options
  • Save sanhuang/7ea72f1311657c6986d01f70871e8edb to your computer and use it in GitHub Desktop.
Save sanhuang/7ea72f1311657c6986d01f70871e8edb to your computer and use it in GitHub Desktop.
我目前使用的book.json設定以及整合gitlab發布pages配置
# requiring the environment of NodeJS 10
image: node:10
# add 'node_modules' to cache for speeding up builds
cache:
paths:
- node_modules/ # Node modules and dependencies
before_script:
- npm install gitbook-cli -g # install gitbook
- gitbook fetch 3.2.3 # fetch final stable version
- gitbook install # add any requested plugins in book.json
test:
stage: test
script:
- gitbook build . public # build to public path
only:
- branches # this job will affect every branch except 'master'
except:
- master
# the 'pages' job will deploy and build your site to the 'public' path
pages:
stage: deploy
script:
- gitbook build . public # build to public path
artifacts:
paths:
- public
expire_in: 1 week
only:
- master # this job will affect only the 'master' branch
{
"title": "San's Docker應用學習手冊",
"author": "San Huang",
"structure": {
"summary": "SUMMARY.md"
},
"plugins": [
"search-plus",
"page-toc",
"prism",
"prism-themes",
"-highlight",
"emphasize",
"local-video",
"youtubex",
"puml",
"copy-code-button"
],
"pluginsConfig": {
"fontSettings": {
"theme": "night",
"family": "sans",
"size": 2
},
"page-toc": {
"selector": ".markdown-section h1, .markdown-section h2, .markdown-section h3"
},
"prism": {
"css": [
"prism-themes/themes/prism-base16-ateliersulphurpool.light.css"
]
},
"youtubex": {
"embedDescription": {
"en": "Watch this video!"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment