From a1af6202838bda609b154f59c190203be2d08b53 Mon Sep 17 00:00:00 2001 From: kanade Date: Mon, 30 May 2022 15:42:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 4 ++- 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..62c617c --- /dev/null +++ b/.drone.yml @@ -0,0 +1,75 @@ +kind: pipeline +type: docker +name: master +steps: + - name: restore-cache + image: meltwater/drone-cache + settings: + backend: filesystem + restore: true + cache_key: node_modules + archive_format: gzip + filesystem_cache_root: "/var/lib/cache" + mount: + - node_modules + volumes: + - name: cache + path: "/var/lib/cache" + # Do stuff.. + - name: install + image: node:14 + commands: + - npm install + - name: rebuild-cache + image: meltwater/drone-cache + settings: + backend: filesystem + rebuild: true + cache_key: node_modules + archive_format: gzip + filesystem_cache_root: "/var/lib/cache" + mount: + - 'node_modules' + volumes: + - name: cache + path: "/var/lib/cache" + # Do stuff.. + - name: build + image: node:14 + commands: + - npm run build + - name: scp files + image: appleboy/drone-scp + settings: + host: 121.41.13.10 + username: + from_secret: aku_user + password: + from_secret: aku_pass + port: 22 + target: /data/data/wwwroot/manage.sws010.com + source: dist/* + - name: ssh + image: appleboy/drone-ssh + settings: + host: 121.41.13.10 + username: + from_secret: aku_user + password: + from_secret: aku_pass + port: 22 + script: + - cd /data/data/wwwroot/manage.sws010.com + - chown -R www.www dist + - \cp -rf dist/* ./ + - rm -rf dist +volumes: + - name: cache + host: + path: "/tmp/cache" +trigger: + branch: + - master + event: + - push + - merge diff --git a/README.md b/README.md index 13b240b..cad4c06 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ # element-template - ## Project setup ``` yarn install @@ -20,5 +19,8 @@ yarn build yarn lint ``` +### Auto Build +[![Build Status](https://drone.oa00.com/api/badges/SWS/starWaySystem/status.svg?ref=refs/heads/master)](https://drone.oa00.com/SWS/starWaySystem) + ### Customize configuration See [Configuration Reference](https://cli.vuejs.org/config/).