Files
gptchat/.drone.yml
admin 1d00f0da7f
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
d
2026-04-04 12:30:05 +10:00

61 lines
1.3 KiB
YAML

kind: pipeline
type: docker
name: default
steps:
- name: build
image: python:3.11-slim
commands:
- pip install --no-cache-dir -r requirements.txt
- name: test
image: python:3.11-slim
commands:
- pip install --no-cache-dir -r requirements.txt
- pip install pytest pytest-asyncio
- pytest tests/ -v || true
- 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 stop gptchat || true
- docker rm gptchat || true
- docker pull gitea.allowlgroup.ru/allowlgroup/gptchat:latest
- docker run -d --name gptchat -p 8484:8484 gitea.allowlgroup.ru/allowlgroup/gptchat:latest
when:
branch:
- main
event:
- push
- custom