2018-12-12 22:51:44 +01:00
|
|
|
# requiring the environment of NodeJS 10
|
|
|
|
image: node:10
|
|
|
|
|
|
|
|
# add 'node_modules' to cache for speeding up builds
|
2018-12-13 15:15:48 +01:00
|
|
|
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
|
2018-12-12 22:51:44 +01:00
|
|
|
|
2018-12-13 15:15:48 +01:00
|
|
|
#build:
|
|
|
|
# stage: build
|
|
|
|
# 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
|
|
|
|
# artifacts:
|
|
|
|
# paths:
|
|
|
|
# - node_modules/
|
2018-12-12 22:51:44 +01:00
|
|
|
|
|
|
|
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
|
2018-11-30 22:33:26 +01:00
|
|
|
pages:
|
|
|
|
stage: deploy
|
|
|
|
script:
|
2018-12-12 22:51:44 +01:00
|
|
|
- gitbook build . public # build to public path
|
2018-12-13 15:00:21 +01:00
|
|
|
- mv assets public/
|
2018-12-13 15:06:31 +01:00
|
|
|
- echo "finished"
|
|
|
|
- ls
|
2018-11-30 22:33:26 +01:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2018-12-12 22:51:44 +01:00
|
|
|
- public
|
|
|
|
expire_in: 1 week
|
2018-11-30 22:33:26 +01:00
|
|
|
only:
|
2018-12-12 22:51:44 +01:00
|
|
|
- master # this job will affect only the 'master' branch
|