提交 49b2f544 作者: 王南南

更新 .gitlab-ci.yml

上级 27fc9da7
echo "Type repo's name:"
read repo
cd ./gb/$repo
git remote add gitlab git@gitlab.com:cakipaul/$repo
git checkout --orphan newbook
git clean -df
echo "# 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
" > .gitlab-ci.yml
echo "*~
_book
node_modules
.DS_Store">.gitignore
#清空历史版本
git checkout --orphan newbook
git clean -df
git add -A
git commit -m "reset repo"
git branch -D master
git branch -m master
git push -f coding master
git push -f gitlab master
\ No newline at end of file
FROM registry-vpc.cn-beijing.aliyuncs.com/qianjia2018/qianjia_public:dist-node as build-stage
WORKDIR /app
COPY package*.json ./
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh
RUN npm config set registry http://172.17.3.95:9000/repository/node-public && npm install
COPY . .
RUN npm run pred
COPY baidu_verify_xrp5U4453i.html /app/dist
FROM registry-vpc.cn-beijing.aliyuncs.com/qianjia2018/qianjia_public:dist-nginx as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论