Fix: use scp instead of docker build
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Developer
2025-12-12 19:12:33 +08:00
parent 076ec9b7c3
commit 4d492f3fea

View File

@@ -9,17 +9,23 @@ trigger:
steps: steps:
- name: build - name: build
image: plugins/docker image: node:16-alpine
settings: commands:
repo: martial/admin-mini - npm install
tags: latest - npm run build:h5
dockerfile: Dockerfile
daemon_off: true
volumes:
- name: docker
path: /var/run/docker.sock
- name: deploy - 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-admin-mini
strip_components: 3
- name: restart
image: appleboy/drone-ssh image: appleboy/drone-ssh
settings: settings:
host: 154.30.6.21 host: 154.30.6.21
@@ -29,9 +35,4 @@ steps:
script: script:
- docker stop martial-admin-mini || true - docker stop martial-admin-mini || true
- docker rm martial-admin-mini || true - docker rm martial-admin-mini || true
- docker run -d --name martial-admin-mini -p 8082:80 martial/admin-mini:latest - docker run -d --name martial-admin-mini -p 8082:80 -v /var/www/martial-admin-mini:/usr/share/nginx/html:ro nginx:alpine
volumes:
- name: docker
host:
path: /var/run/docker.sock