dawdle/.drone.yml
pwgen2155 4767f2b1bf
All checks were successful
continuous-integration/drone/push Build is passing
fix: build & deploy
2024-03-21 20:41:43 +11:00

47 lines
760 B
YAML

kind: pipeline
name: test
type: docker
clone:
depth: 1
workspace:
path: /drone/src
steps:
- name: tests
image: python:3.11
commands:
- pip install -r requirements.txt
- cd site
- ./manage.py migrate --database=default
- ./manage.py migrate --database=game
- ./manage.py collectstatic --no-input
- ./manage.py test
trigger:
event:
- push
---
kind: pipeline
name: deploy
steps:
- name: deploy
image: appleboy/drone-ssh
settings:
host: irc.l3.lv
username:
from_secret: username
key:
from_secret: ssh_key
script:
- git fetch && git checkout main --force && git pull --force && sudo make prod
depends_on:
- test
trigger:
branch:
- main