makeit-graffiti/.drone.yml
makeit 19677c7c99
All checks were successful
continuous-integration/drone/push Build is passing
drone.yml
2024-08-07 16:54:00 +08:00

46 lines
1016 B
YAML

kind: pipeline
type: docker
name: makeit-graffiti
steps:
- name: 'build'
image: node:12
commands:
- node -v
- npm -v
- ls -al
- npm config set registry https://registry.npmmirror.com/
- npm i
- npm run build:prod
- name: 'copy'
image: appleboy/drone-scp
settings:
host:
from_secret: secret_host
username:
from_secret: secret_username
password:
from_secret: secret_password
port: 22
source: ./dist/*
target: /makeit/web/graffiti
- name: 'deploy'
image: appleboy/drone-ssh
settings:
host:
from_secret: secret_host
username:
from_secret: secret_username
password:
from_secret: secret_password
port: 22
command_timeout: 3m
script:
- echo '====== deploy start ======'
- cd /makeit/web/graffiti
- rm -rf !\(dist*\)
- mv ./dist/* ./
- rm -rf dist
- echo '====== deploy success ======'