diff --git a/.drone.yml b/.drone.yml index 5759bf8..1807c04 100644 --- a/.drone.yml +++ b/.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: diff --git a/README.md b/README.md index f055654..f54b768 100644 --- a/README.md +++ b/README.md @@ -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模式授权登录。 diff --git a/index.html b/index.html index b4463d2..8a03991 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ -