构建gitbook并基于gitlab自动发布~
发表于:2024-09-21 作者:千家信息网编辑
千家信息网最后更新 2024年09月21日,整个构建过程分为以下几个部分: 安装node,npm部署gitbook gitlab版本8以上支持pipelines,服务器上安装,配置gitlab runner。1.安装nodecurl -sL h
千家信息网最后更新 2024年09月21日构建gitbook并基于gitlab自动发布~
整个构建过程分为以下几个部分: 安装node,npm部署gitbook gitlab版本8以上支持pipelines,服务器上安装,配置gitlab runner。
1.安装node
curl -sL https://rpm.nodesource.com/setup_6.x | bash - (6.9.5)yum install -y nodejs
2.安装gitbook
npm install -g gitbook-cli
3.gitlab-ci实现 gitlab的CI主要通过新版本的pipelines功能。 实现原理: 在部署服务器上运行一个gitlab的runner,并且在gitlab项目的根目录下创建.gitlab-ci.yml文件,里面主要保存一些运行 脚本,当有新数据被push时,就会执行其中的代码,实现持续集成。 实现步骤: 1.在项目根目录下新建.gitlab-ci.yml文件,内容如下
rspec: script: - gitbook init - gitbook build - sh start.sh
当项目内容更新时,更新的内容就会pull到部署服务器,然后依次执行上面代码,完成gitbook的更新。 2.安装runner到服务器上
#增加gitlab的yum源仓库curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.rpm.sh | sudo bash#yum安装runneryum install gitlab-ci-multi-runner
为了把runner添加到gitlab项目中,需要项目的token和gitlab的url,在服务器上运行如下代码:
gitlab-ci-multi-runner registerPlease enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):your urlPlease enter the gitlab-ci token for this runner:your tokenPlease enter the gitlab-ci description for this runner:[opstest]: Please enter the gitlab-ci tags for this runner (comma separated):opsdoc Whether to run untagged builds [true/false]:[false]:true #此处我选择的是true,不然每次push还得弄tag Whether to lock Runner to current project [true/false]:[false]: Registering runner... succeeded
然后根据提示信息输入,具体的token和url在项目的Settings-->CI/CD Pipelines
下。 然后你就会在上图页面看到你增加的runner了。记得要Whether to run untagged builds [true/false]:选择true,不然触发时会卡住~ 理论上建立完毕之后就会部署一次,可在项目路径下Pipelines--->Pipelines里面查看部署过程。
项目
服务器
服务
代码
内容
更新
运行
文件
根目录
过程
选择
上图
个部
仓库
信息
功能
原理
可在
数据
步骤
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
2018网络安全调查报告
手机版方舟有哪些服务器
数据库中时间的数据类型
网络安全等级保护共几集
诊所网络安全和信息化自查报告
服务器运维试题
网络安全法不少于几个月
网络安全右键
南宁医疗软件开发
南理工网络安全空间学院
网络安全意识警示教育
网络安全重要作用
学术文献数据库及各自特点
汉滨区互联网科技公司空调招投标
山东存储服务器哪个系列好
网络安全岗位任职资格
考勤系统数据库实践报告
怎么限制我的世界服务器边界
软件开发与软件设计工程师哪个好
店群需要买服务器吗
linux服务器管理笔记
华为服务器项目管理工资高吗
华为嵌入式软件开发
网站怎么挂在服务器上
甘肃省网络安全院士
社区防灾减灾网络安全培训
测试linux服务器安全
网络安全校园日的黑板报
重庆小蚁网络安全
数据库操作