持续集成
This commit is contained in:
parent
318bfa74f6
commit
ef58e7da70
33
.drone.yml
33
.drone.yml
|
@ -9,10 +9,41 @@ volumes:
|
|||
# Host Volume, 挂载到宿主机上的卷轴
|
||||
host:
|
||||
# 宿主机的绝对路径
|
||||
path: /home/drone/cache/auto_deploy/node_modules
|
||||
path: /home/drone/cache/blog/node_modules
|
||||
|
||||
|
||||
steps:
|
||||
- name: public-npm # 步骤名称
|
||||
image: node:12.22.5 # 使用镜像和版本
|
||||
environment:
|
||||
NPM:
|
||||
from_secret: npm
|
||||
commands:
|
||||
- pwd # 查看当前目录 `/drone/src`
|
||||
- ls -alt
|
||||
- npm config set registry https://registry.npmjs.org # 切换官方仓库
|
||||
- npm config set -- $NPM # 切换官方仓库
|
||||
- npm publish --access public # 发布
|
||||
when:
|
||||
event: tag
|
||||
|
||||
- name: public-dllcnx # 步骤名称
|
||||
image: node:12.22.5 # 使用镜像和版本
|
||||
environment:
|
||||
DLLCNX_NPM:
|
||||
from_secret: dllcnx_npm
|
||||
DLLCNX_NPM_URL:
|
||||
from_secret: dllcnx_npm_urls
|
||||
commands:
|
||||
- pwd # 查看当前目录 `/drone/src`
|
||||
- ls -alt
|
||||
- npm config set registry $DLLCNX_NPM_URL # 切换私有仓库
|
||||
- npm config set -- $DLLCNX_NPM
|
||||
# 切换私有仓库
|
||||
- npm publish # 发布
|
||||
when:
|
||||
event: tag
|
||||
|
||||
- name: deploy-project
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
|
|
|
@ -108,5 +108,5 @@ npm install @dllcnx/auto-deploy -D
|
|||
|
||||
### 加密页面
|
||||
|
||||
[在线加密页面](http://dllcnx.com:15200/DeployAes/index.html)或者直接访问项目根目录单页面,加密目前只是简单混淆,防止密码明文直接暴漏到配置文件,但是会查看源码依旧存在暴漏风险,所以建议ssh的key模式授权登录。
|
||||
[在线加密页面](https://dllcnx.com:18999/deploy/index.html)或者直接访问项目根目录单页面,加密目前只是简单混淆,防止密码明文直接暴漏到配置文件,但是会查看源码依旧存在暴漏风险,所以建议ssh的key模式授权登录。
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Document</title>
|
||||
<title>autoDeploy</title>
|
||||
<script src="./utils/Base.js"></script>
|
||||
<script src="./utils/crypto-js.js"></script>
|
||||
</head>
|
||||
|
|
Loading…
Reference in New Issue