75 lines
1.6 KiB
YAML
75 lines
1.6 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
platform:
|
|
arch: amd64
|
|
|
|
|
|
steps:
|
|
- name: build
|
|
image: node:slim
|
|
commands:
|
|
- npm config set registry http://mirrors.cloud.tencent.com/npm/
|
|
- npm config get registry
|
|
- npm install -g wpsjs
|
|
- wpsjs publish -s https://wps.woni.link/jsplugindir/
|
|
|
|
- name: upload plugin
|
|
image: appleboy/drone-scp
|
|
pull: never
|
|
settings:
|
|
host:
|
|
from_secret: ssh_host
|
|
username:
|
|
from_secret: ssh_user
|
|
port: 22
|
|
password:
|
|
from_secret: ssh_key
|
|
tags: 0.1
|
|
target: /data/www-data/xbotwps
|
|
source: ./wps-addon-build/*
|
|
|
|
- name: upload pushlish.html
|
|
image: appleboy/drone-scp
|
|
pull: never
|
|
settings:
|
|
host:
|
|
from_secret: ssh_host
|
|
username:
|
|
from_secret: ssh_user
|
|
port: 22
|
|
password:
|
|
from_secret: ssh_key
|
|
tags: 0.1
|
|
target: /data/www-data/xbotwps
|
|
source: ./wps-addon-publish/publish.html
|
|
|
|
- name: adjust dirctory
|
|
image: appleboy/drone-ssh
|
|
pull: never
|
|
settings:
|
|
host:
|
|
from_secret: ssh_host
|
|
username:
|
|
from_secret: ssh_user
|
|
port: 22
|
|
password:
|
|
from_secret: ssh_key
|
|
script:
|
|
- cd /data/www-data/xbotwps/wps-addon-build
|
|
- rm -rf /data/www-data/xbotwps/jsplugindir
|
|
- mkdir /data/www-data/xbotwps/jsplugindir
|
|
- mv ./* ../jsplugindir
|
|
- cd /data/www-data/xbotwps/wps-addon-publish
|
|
- mv ./* ../jsplugindir
|
|
- rm -rf /data/www-data/xbotwps/wps-addon-build
|
|
- rm -rf /data/www-data/xbotwps/wps-addon-publish
|
|
|
|
trigger:
|
|
branch:
|
|
include:
|
|
- main
|
|
- /^release-.*$/
|