intra_max_bot/.woodpecker.yml
2026-03-19 17:05:20 +03:00

34 lines
895 B
YAML

when:
- event: [push]
steps:
test:
image: python:3.11-slim
commands:
- pip install --no-cache-dir -r requirements.txt
- pytest -q tests -p no:cacheprovider
deploy_no_docker:
image: appleboy/drone-ssh
settings:
host:
from_secret: forgejo_host_ssh
username:
from_secret: forgejo_user_ssh
key:
from_secret: forgejo_key_ssh
port:
from_secret: forgejo_port_ssh
script:
- cd /home/caps/intra_max_bot
- git pull --ff-only
- if [ ! -d .venv ]; then python3 -m venv .venv; fi
- . .venv/bin/activate
- pip install --no-cache-dir -r requirements.txt
- sudo systemctl restart max-support
- set -a
- . /home/caps/intra_max_bot/.env
- set +a
- curl -fsS http://127.0.0.1:${APP_PORT}/health
when:
- branch: [main, master]