Commit f345cb5b authored by zhouzihao's avatar zhouzihao

更新.gitlab-ci.yaml

parent 4c50713c
# requiring the environment of NodeJS 6 # # requiring the environment of NodeJS 6
image: node:6 # image: node:6
# add 'node_modules' to cache for speeding up builds # # add 'node_modules' to cache for speeding up builds
cache: # cache:
paths: # paths:
- node_modules/ # Node modules and dependencies # - node_modules/ # Node modules and dependencies
before_script: # before_script:
- npm install gitbook-cli -g # install gitbook # - npm install gitbook-cli -g # install gitbook
- gitbook fetch 3.2.3 # fetch final stable version # - gitbook fetch 3.2.3 # fetch final stable version
- gitbook install # add any requested plugins in book.json # - 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
stages:
- test
- build
- deploy
test: test:
stage: test stage: test
script: script: echo "Running tests"
- gitbook build . public # build to public path
only: build:
- branches # this job will affect every branch except 'master' stage: build
except: script: echo "Building the app"
- master
deploy_staging:
# the 'pages' job will deploy and build your site to the 'public' path
pages:
stage: deploy stage: deploy
script: script:
- gitbook build . public # build to public path - echo "Deploy to staging server"
artifacts: environment:
paths: name: staging
- public url: https://staging.example.com
expire_in: 1 week
only: only:
- master # this job will affect only the 'master' branch - master
————————————————
版权声明:本文为CSDN博主「苍穹尘」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/lizhiqiang1217/article/details/88803783
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment