2024-02-28 05:32:08 +00:00
|
|
|
kind: pipeline
|
|
|
|
name: test
|
|
|
|
type: docker
|
|
|
|
|
2024-02-28 08:46:29 +00:00
|
|
|
clone:
|
|
|
|
depth: 1
|
|
|
|
|
2024-02-28 08:48:56 +00:00
|
|
|
workspace:
|
|
|
|
path: /drone/src
|
|
|
|
|
2024-02-28 05:32:08 +00:00
|
|
|
steps:
|
2024-02-28 08:48:56 +00:00
|
|
|
- name: tests
|
2024-02-28 08:46:29 +00:00
|
|
|
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
|
2024-02-28 23:28:24 +00:00
|
|
|
- ./manage.py test
|
2024-02-29 00:23:15 +00:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|
2024-02-28 23:28:24 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: deploy
|
|
|
|
|
|
|
|
steps:
|
2024-02-29 00:23:15 +00:00
|
|
|
- name: deploy
|
2024-02-29 00:44:37 +00:00
|
|
|
image: appleboy/drone-ssh
|
|
|
|
settings:
|
|
|
|
host: irc.l3.lv
|
|
|
|
username:
|
|
|
|
from_secret: username
|
|
|
|
key:
|
|
|
|
from_secret: ssh_key
|
|
|
|
script:
|
2024-03-01 08:49:04 +00:00
|
|
|
- git fetch && git checkout main --force && git pull && sudo docker compose up -d --build
|
2024-02-29 00:44:37 +00:00
|
|
|
depends_on:
|
|
|
|
- test
|
2024-02-29 00:23:15 +00:00
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
|
|
|
|
|