fe-drone-ci/.drone.yml

67 lines
1.2 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 11:18:51 +00:00
target: /mnt/d/deploy/node/UserModule
2021-06-02 11:24:23 +00:00
source: dist/*
2021-06-02 11:18:51 +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:
# - echo hello
# - echo world
# - ls -l
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