2 Commits 715a23c6bc ... 6942ebd5e1

Author SHA1 Message Date
  liql 6942ebd5e1 测试 drone 2 years ago
  liql 2a46404f9e 测试 drone 2 years ago
1 changed files with 4 additions and 5 deletions
  1. 4 5
      drone.yml

+ 4 - 5
drone.yml

@@ -1,6 +1,6 @@
 kind: pipeline # 定义对象类型,还有secret和signature两种类型
 type: docker # 定义流水线类型,还有kubernetes、exec、ssh等类型
-&name: veterans_teacher # 定义流水线名称
+name: veterans_teacher # 定义流水线名称
 
 steps: # 定义流水线执行步骤,这些步骤将顺序执行
   - name: package # 流水线名称
@@ -11,11 +11,10 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
       - name: node-build
         path: /tmp
     commands: # 定义在Docker容器中执行的shell命令
-      - ls
       - npm install --registry=https://registry.npmmirror.com/  # 应用打包命令
       - npm run build
-      - mkdir -p /tmp/*name/dist
-      - cp -r dist/* /tmp/*name/dist
+      - mkdir -p /tmp/veterans_teacher/dist
+      - cp -r dist/* /tmp/veterans_teacher/dist
 
   - name: deploy
     image: appleboy/drone-ssh # SSH工具镜像
@@ -29,7 +28,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
       script:
         - mv /www/wwwroot/veteransteacher/ /tmp/$(uuidgen)
         - mkdir -p /www/wwwroot/veteransteacher
-        - cp -r /mydata/node/build/*name/dist/* /www/wwwroot/veteransteacher # 进入宿主机构建目录
+        - cp -r /mydata/node/build/veterans_teacher/dist/* /www/wwwroot/veteransteacher # 进入宿主机构建目录
 
 volumes:
   # 定义流水线挂载目录,用于共享数据