2
0
Fork 0
shiftregister/.drone.yml

52 lines
952 B
YAML
Raw Normal View History

2024-04-12 23:46:49 +02:00
---
kind: pipeline
type: docker
name: default
steps:
2024-05-03 22:05:06 +02:00
- name: check style
image: python:3.12-alpine
commands:
2024-05-03 22:10:13 +02:00
- apk add --no-cache git # required by isort to skip files in .gitignore
2024-05-03 22:05:06 +02:00
- pip install black isort
- black --check .
- isort -c .
2024-04-12 23:46:49 +02:00
- 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
2024-04-13 00:06:00 +02:00
envs:
- INSTANCE
2024-04-12 23:46:49 +02:00
script:
- sudo deploy-shiftregister.sh "$$INSTANCE"
when:
branch:
- main
2024-05-03 22:05:06 +02:00
event:
- push
2024-04-12 23:46:49 +02:00
- name: deploy production
image: ghcr.io/appleboy/drone-ssh
environment:
INSTANCE: production
settings: *settings
when:
branch:
- live
2024-05-03 22:05:06 +02:00
event:
- push
2024-04-12 23:46:49 +02:00
trigger:
event:
2024-05-03 22:05:06 +02:00
- pull_request
2024-04-12 23:46:49 +02:00
- push