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/).