makeit-scan/.drone.yml
makeit 8d99dba44e
All checks were successful
continuous-integration/drone/push Build is passing
ads
2024-08-07 16:26:42 +08:00

54 lines
1.2 KiB
YAML

kind: pipeline
type: docker
name: makeit-scan
steps:
- name: 'build'
image: node
volumes:
- name: node_modules_cache
path: /drone/src/node_modules
commands:
- node -v
- npm -v
- ls -al
- npm config set registry https://registry.npmmirror.com/
- npm i
- npm run build
- 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/scan
- 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/scan
- rm -rf index.html favicon.ico _assets ads.txt
- mv ./dist/* ./
- rm -rf dist
- echo '====== deploy success ======'
volumes:
- name: node_modules_cache
host:
path: /makeit/web/drone/node_modules