Fix: use scp instead of docker build
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
31
.drone.yml
31
.drone.yml
@@ -9,17 +9,23 @@ trigger:
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: martial/mini
|
||||
tags: latest
|
||||
dockerfile: Dockerfile
|
||||
daemon_off: true
|
||||
volumes:
|
||||
- name: docker
|
||||
path: /var/run/docker.sock
|
||||
image: node:16-alpine
|
||||
commands:
|
||||
- npm install
|
||||
- npm run build:h5
|
||||
|
||||
- name: deploy
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
host: 154.30.6.21
|
||||
username: root
|
||||
key:
|
||||
from_secret: ssh_key
|
||||
source: dist/build/h5/*
|
||||
target: /var/www/martial-mini
|
||||
strip_components: 3
|
||||
|
||||
- name: restart
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
host: 154.30.6.21
|
||||
@@ -29,9 +35,4 @@ steps:
|
||||
script:
|
||||
- docker stop martial-mini || true
|
||||
- docker rm martial-mini || true
|
||||
- docker run -d --name martial-mini -p 8081:80 martial/mini:latest
|
||||
|
||||
volumes:
|
||||
- name: docker
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
- docker run -d --name martial-mini -p 8081:80 -v /var/www/martial-mini:/usr/share/nginx/html:ro nginx:alpine
|
||||
|
||||
Reference in New Issue
Block a user