forked from um/web
CI: Auto Deploy and Use Cache
This commit is contained in:
parent
538705187a
commit
497a63486d
39
.drone.yml
39
.drone.yml
@ -7,10 +7,20 @@ clone:
|
|||||||
depth: 1
|
depth: 1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: restore-cache
|
||||||
|
image: drillster/drone-volume-cache
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /cache
|
||||||
|
settings:
|
||||||
|
restore: true
|
||||||
|
mount:
|
||||||
|
- ./node_modules
|
||||||
|
|
||||||
- name: installDependencies
|
- name: installDependencies
|
||||||
image: node:lts
|
image: node:lts
|
||||||
commands:
|
commands:
|
||||||
- npm config set registry http://registry.npm.taobao.org
|
- npm config set registry http://registry.npm.taobao.org --global
|
||||||
- npm install
|
- npm install
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
@ -31,3 +41,30 @@ steps:
|
|||||||
- sha256
|
- sha256
|
||||||
when:
|
when:
|
||||||
event: [tag]
|
event: [tag]
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
image: plugins/s3
|
||||||
|
settings:
|
||||||
|
bucket: unlock-music
|
||||||
|
access_key:
|
||||||
|
from_secret: aws_access_key_id
|
||||||
|
secret_key:
|
||||||
|
from_secret: aws_secret_access_key
|
||||||
|
source: dist/**/*
|
||||||
|
target: /
|
||||||
|
path_style: true
|
||||||
|
endpoint: https://fs.sz2.ixarea.com
|
||||||
|
|
||||||
|
- name: rebuild-cache
|
||||||
|
image: drillster/drone-volume-cache
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /cache
|
||||||
|
settings:
|
||||||
|
rebuild: true
|
||||||
|
mount:
|
||||||
|
- ./node_modules
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
host:
|
||||||
|
path: /tmp/cache
|
Loading…
Reference in New Issue
Block a user