Files
gptchat/.drone.yml
T
2026-10-02 12:43:42 +10:00

69 lines
1.6 KiB
YAML

kind: pipeline
type: docker
name: default
steps:
- name: test
image: python:3.11-slim
commands:
- pip install --no-cache-dir -r requirements.txt
- pip install --no-cache-dir pytest pytest-asyncio
- pytest tests/ -v
when:
event:
- push
- pull_request
- custom
- name: docker-build
image: plugins/docker
settings:
repo: gitea.allowlgroup.ru/allowlgroup/gptchat
registry: https://gitea.allowlgroup.ru
insecure: true
tags:
- latest
- ${DRONE_COMMIT_SHA:0:8}
username:
from_secret: docker_username
password:
from_secret: docker_password
context: .
dockerfile: Dockerfile
when:
branch:
- main
event:
- push
- custom
- name: deploy
image: appleboy/drone-ssh
settings:
host: allowlgroup.ru
username:
from_secret: ssh_username
password:
from_secret: ssh_password
port: 22
script:
- docker login gitea.allowlgroup.ru -u $DOCKER_USER -p $DOCKER_PASS
- docker stop gptchat 2>/dev/null || true
- docker rm gptchat 2>/dev/null || true
- docker pull gitea.allowlgroup.ru/allowlgroup/gptchat:latest
- docker run -d --name gptchat -p 8484:8484 gitea.allowlgroup.ru/allowlgroup/gptchat:latest
- docker image prune -f
envs:
- docker_user
- docker_pass
environment:
docker_user:
from_secret: docker_username
docker_pass:
from_secret: docker_password
when:
branch:
- main
event:
- push
- custom