自动部署

master
kanade 3 years ago
parent c52ec60aed
commit a1af620283

@ -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

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

Loading…
Cancel
Save