Restructure pipeline
This commit is contained in:
parent
cd27815b2e
commit
5099bffff8
36
.drone.yml
36
.drone.yml
@ -11,8 +11,12 @@ steps:
|
||||
- name: test-build
|
||||
image: asciidoctor/docker-asciidoctor
|
||||
commands:
|
||||
- asciidoctor projects/*.adoc || true
|
||||
- asciidoctor diaries/*.adoc || true
|
||||
- asciidoctor **/*.adoc
|
||||
- name: verify-json
|
||||
image: node:lts-alpine
|
||||
commands:
|
||||
- npm install -g ajv-cli ajv-formats
|
||||
- ajv validate --spec=draft2020 -s ./list.schema.json -d ./list.json -c ajv-formats
|
||||
---
|
||||
kind: pipeline
|
||||
type: ssh
|
||||
@ -20,8 +24,6 @@ name: deploy
|
||||
depends_on:
|
||||
- test
|
||||
trigger:
|
||||
branch:
|
||||
- senpai
|
||||
event:
|
||||
- push
|
||||
server:
|
||||
@ -32,33 +34,19 @@ server:
|
||||
ssh_key:
|
||||
from_secret: ssh_key
|
||||
steps:
|
||||
- name: pull
|
||||
- name: pull-main
|
||||
when:
|
||||
branch:
|
||||
- senpai
|
||||
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:
|
||||
- name: pull-dev
|
||||
when:
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user