makeit-graffiti/.drone.yml
makeit 11051584b1
Some checks failed
continuous-integration/drone/push Build is failing
drone.yml
2024-08-07 14:10:28 +08:00

53 lines
1.2 KiB
YAML

kind: pipeline
type: docker
name: makeit-graffiti
steps:
- name: 'build'
image: node:14
volumes:
- name: node_modules_cache
path: /drone/src/node_modules
commands:
- pwd
- 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 index.html favicon.ico ads.txt js css fonts img
- mv ./dist/* ./
- rm -rf dist
- echo '====== deploy success ======'
volumes:
- name: node_modules_cache
host:
path: /makeit/web/drone/node_modules