Restructure pipeline

This commit is contained in:
Daniel Kluge 2022-06-23 17:16:20 +02:00
parent cd27815b2e
commit 5099bffff8

View File

@ -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,35 +34,21 @@ 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:
branch:
- dev
event:
- push
server:
host:
from_secret: ssh_host
user:
from_secret: ssh_user
ssh_key:
from_secret: ssh_key
steps:
- name: pull
- name: pull-dev
when:
branch:
- dev
commands:
- cd /srv/website-dev/content
- git config --global --add safe.directory /srv/website-dev/content
- git switch dev || true
- git pull
- git pull