frontpage-content/.drone.yml
2022-06-12 15:39:31 +02:00

66 lines
1.0 KiB
YAML

kind: pipeline
type: docker
name: test
trigger:
event:
- push
branch:
- senpai
- dev
steps:
- name: test-build
image: asciidoctor/docker-asciidoctor
commands:
- asciidoctor projects/*.adoc || true
- asciidoctor diaries/*.adoc || true
---
kind: pipeline
type: ssh
name: deploy
depends_on:
- test
trigger:
branch:
- senpai
event:
- push
server:
host:
from_secret: ssh_host
user:
from_secret: ssh_user
ssh_key:
from_secret: ssh_key
steps:
- name: pull
commands:
- cd /srv/website/content
- git config --global --add safe.directory /srv/website/content
- git switch senpai || true
- git pull
---
# Push on dev environment
kind: pipeline
type: ssh
name: deploy-dev
depends_on:
- test
trigger:
branch:
- dev
event:
- push
server:
host:
from_secret: ssh_host
user:
from_secret: ssh_user
ssh_key:
from_secret: ssh_key
steps:
- name: pull
commands:
- cd /srv/website-dev/content
- git config --global --add safe.directory /srv/website-dev/content
- git switch dev || true
- git pull