You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
712 B

kind: pipeline
type: docker
name: api2gpt-mid
steps:
- name: build
image: golang:1.18
commands:
- go env -w GOPROXY=https://goproxy.cn,direct
- go mod download
- CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o deploy/api2gpt-mid
- echo "Build Successfully"
- name: sync-file
image: drillster/drone-rsync
settings:
user: root
key:
from_secret: kelvin_ssh_key
hosts: # 多个ip使用,隔开
from_secret: kelvin_ssh_host
# 来源目录
source: deploy/
# 目标服务器目录
target: /data/wwwroot/api2gpt/mid
script:
- cd /data/wwwroot/api2gpt/mid
- docker-compose up -d --build