2
0
Fork 0
shiftregister/.drone.yml

51 lines
872 B
YAML

---
kind: pipeline
type: docker
name: default
steps:
- name: check style
image: python:3.12-alpine
commands:
- pip install black isort
- black --check .
- isort -c .
- name: deploy staging
image: ghcr.io/appleboy/drone-ssh
environment:
INSTANCE: staging
settings: &settings
host:
from_secret: ssh_host
username:
from_secret: ssh_username
key:
from_secret: ssh_key
envs:
- INSTANCE
script:
- sudo deploy-shiftregister.sh "$$INSTANCE"
when:
branch:
- main
event:
- push
- name: deploy production
image: ghcr.io/appleboy/drone-ssh
environment:
INSTANCE: production
settings: *settings
when:
branch:
- live
event:
- push
trigger:
event:
- pull_request
- push