添加部署脚本
continuous-integration/drone Build is passing
Details
continuous-integration/drone Build is passing
Details
parent
57b03b97ac
commit
7dd506c624
@ -0,0 +1,26 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: api2gpt-mid
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: golang:1.18-alpine
|
||||||
|
commands:
|
||||||
|
- go env -w GOPROXY=https://goproxy.cn,direct
|
||||||
|
- go mod download
|
||||||
|
- CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o api2gpt-mid
|
||||||
|
- name: sync-file
|
||||||
|
image: drillster/drone-rsync
|
||||||
|
settings:
|
||||||
|
user: root
|
||||||
|
key:
|
||||||
|
from_secret: ssh_key
|
||||||
|
hosts: # 多个ip使用,隔开
|
||||||
|
from_secret: ssh_host
|
||||||
|
# 来源目录
|
||||||
|
source: ./api2gpt-mid
|
||||||
|
# 目标服务器目录
|
||||||
|
target: /mnt/data/wwwroot/api2gpt/mid
|
||||||
|
script:
|
||||||
|
- cd /mnt/data/wwwroot/api2gpt/mid
|
||||||
|
- ./api2gpt-mid
|
||||||
Loading…
Reference in new issue