update doc
Some checks failed
continuous-integration/drone/push Build encountered an error

This commit is contained in:
2023-07-09 02:26:34 +08:00
parent 023e36b052
commit 2e7766631f
5 changed files with 205 additions and 11 deletions

View File

@@ -1,35 +1,46 @@
# drone 会自动先拉取代码
# 再按顺序执行 pipeline 配置中定义的任务
# 这个配置定义了一个叫 run 的步骤
# 代码拉取后会使用 python:3.7-alpine3.8 镜像来执行项目目录下的 a.py 文件
# 由于现在仓库中并不存在 a.py 文件所以第次的测试肯定是失败的
---
kind: pipeline
type: docker
name: default
name: feature
platform:
os: linux
arch: amd64
trigger:
branch:
include:
- feature/*
clone:
disable: true
steps:
- name: run
image: python:3.9.13-alpine3.15
commands:
- python3 test.py
- name: deploy
image: appleboy/drone-ssh
settings:
host: 118.25.83.116
host:
from_secret: host
username: root
key:
from_secret: ssh_key
port: 22
script_stop: true
script:
- echo "yulong test" > /tmp/yulong_test.drone
- cd /var/www/todo
- git fetch
- git reset --hard ${DRONE_COMMIT}
- docker-compose down
- docker-compose up -d --build
- docker image prune -f
when:
event:
include:
- push
- custom