fe-drone-ci/.drone.yml

73 lines
1.3 KiB
YAML
Raw Normal View History

2021-06-02 10:00:25 +00:00
kind: pipeline
type: docker
name: vue-admin
trigger:
branch: ci
steps:
2021-06-02 10:21:56 +00:00
- name: restore-modules
2021-06-02 10:19:32 +00:00
image: drillster/drone-volume-cache
volumes:
- name: modules
path: /cache
settings:
restore: true
mount:
- ./node_modules
2021-06-02 11:01:17 +00:00
- ./yarn.lock
2021-06-02 10:00:25 +00:00
- name: build
image: node:12.16.1
commands:
- yarn
- yarn build:prod
2021-06-02 10:21:56 +00:00
- name: rebuild-modules
image: drillster/drone-volume-cache
volumes:
- name: modules
path: /cache
settings:
rebuild: true
mount:
- ./node_modules
2021-06-02 11:01:17 +00:00
- ./yarn.lock
2021-06-02 10:00:25 +00:00
2021-06-02 11:18:51 +00:00
- name: scp
image: appleboy/drone-scp
2021-06-02 11:09:17 +00:00
settings:
host: 124.156.152.247
username:
from_secret: ssh_username
password:
from_secret: ssh_pwd
port: 8011
2021-06-02 13:28:20 +00:00
target:
2021-06-02 13:51:15 +00:00
- /mnt/d/deploy/fe/cidemoadmin
2021-06-02 13:28:20 +00:00
source:
- dist
- docker-compose.yml
- nginx.conf
- frpc.ini
2021-06-02 11:18:51 +00:00
2021-06-02 13:28:20 +00:00
- name: deploy
image: appleboy/drone-ssh
settings:
host: 124.156.152.247
username:
from_secret: ssh_username
password:
from_secret: ssh_pwd
port: 8011
script:
2021-06-02 13:51:15 +00:00
- cd /mnt/d/deploy/fe/cidemoadmin
2021-06-02 13:28:20 +00:00
- docker-compose down
- docker-compose up -d
- docker-compose logs
2021-06-02 11:09:17 +00:00
2021-06-02 10:00:25 +00:00
volumes:
- name: modules
host:
2021-06-02 11:01:17 +00:00
path: /mnt/d/ci_volumes