This commit is contained in:
parent
af7afc040d
commit
f1c55607ff
54
.drone.yml
Normal file
54
.drone.yml
Normal file
@ -0,0 +1,54 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: vue-deployment
|
||||
|
||||
steps:
|
||||
# 编译
|
||||
- name: build
|
||||
image: node:lts
|
||||
commands:
|
||||
- npm config set registry https://mirrors.cloud.tencent.com/npm/
|
||||
- rm -rf dist
|
||||
- npm install
|
||||
- npm run build
|
||||
|
||||
# 清除旧版本
|
||||
- name: clean
|
||||
image: appleboy/drone-ssh
|
||||
when:
|
||||
branch: deploy
|
||||
event: push
|
||||
settings:
|
||||
host:
|
||||
from_secret: ssh_host
|
||||
username:
|
||||
from_secret: ssh_username
|
||||
key:
|
||||
from_secret: ssh_key
|
||||
port:
|
||||
from_secret: ssh_port
|
||||
command_timeout: 2m
|
||||
script:
|
||||
- 'rm -rf ${target}/*'
|
||||
|
||||
# 部署
|
||||
- name: deploy
|
||||
image: appleboy/drone-scp
|
||||
when:
|
||||
branch: deploy
|
||||
event: push
|
||||
settings:
|
||||
host:
|
||||
from_secret: ssh_host
|
||||
username:
|
||||
from_secret: ssh_username
|
||||
key:
|
||||
from_secret: ssh_key
|
||||
port:
|
||||
from_secret: ssh_port
|
||||
command_timeout: 2m
|
||||
target:
|
||||
from_secret: target
|
||||
overwrite: true
|
||||
source:
|
||||
- ./dist/*
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -28,3 +28,5 @@ coverage
|
||||
*.sw?
|
||||
|
||||
*.tsbuildinfo
|
||||
pnpm-lock.yaml
|
||||
package-lock.json
|
||||
|
2379
package-lock.json
generated
2379
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user