Restructure pipeline
This commit is contained in:
parent
cd27815b2e
commit
5099bffff8
40
.drone.yml
40
.drone.yml
@ -11,8 +11,12 @@ steps:
|
|||||||
- name: test-build
|
- name: test-build
|
||||||
image: asciidoctor/docker-asciidoctor
|
image: asciidoctor/docker-asciidoctor
|
||||||
commands:
|
commands:
|
||||||
- asciidoctor projects/*.adoc || true
|
- asciidoctor **/*.adoc
|
||||||
- asciidoctor diaries/*.adoc || true
|
- 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
|
kind: pipeline
|
||||||
type: ssh
|
type: ssh
|
||||||
@ -20,8 +24,6 @@ name: deploy
|
|||||||
depends_on:
|
depends_on:
|
||||||
- test
|
- test
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
|
||||||
- senpai
|
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
server:
|
server:
|
||||||
@ -32,33 +34,19 @@ server:
|
|||||||
ssh_key:
|
ssh_key:
|
||||||
from_secret: ssh_key
|
from_secret: ssh_key
|
||||||
steps:
|
steps:
|
||||||
- name: pull
|
- name: pull-main
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- senpai
|
||||||
commands:
|
commands:
|
||||||
- cd /srv/website/content
|
- cd /srv/website/content
|
||||||
- git config --global --add safe.directory /srv/website/content
|
- git config --global --add safe.directory /srv/website/content
|
||||||
- git switch senpai || true
|
- git switch senpai || true
|
||||||
- git pull
|
- git pull
|
||||||
---
|
- name: pull-dev
|
||||||
# Push on dev environment
|
when:
|
||||||
kind: pipeline
|
branch:
|
||||||
type: ssh
|
- dev
|
||||||
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:
|
commands:
|
||||||
- cd /srv/website-dev/content
|
- cd /srv/website-dev/content
|
||||||
- git config --global --add safe.directory /srv/website-dev/content
|
- git config --global --add safe.directory /srv/website-dev/content
|
||||||
|
Loading…
Reference in New Issue
Block a user