feat: Updated drone configuration to match main branch.

This commit is contained in:
muli 2022-10-25 16:54:45 +02:00
parent 880016950e
commit 29613ac472

View File

@ -1,46 +1,75 @@
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: build_webseite_main name: build
workspace:
path: /workspace
steps:
- name: build
image: registry.wtf-eg.net/lektor
image_pull_secrets:
- dockerconfig
trigger: trigger:
branch: branch:
- main - main
event: - spielwiese
event:
- push - push
- pull_request
steps:
- name: build
image: python:3.10-alpine
commands:
- apk add imagemagick
- python3 -m pip install --user pipx
- export PATH=/root/.local/bin:$PATH
- pipx install lektor
- lektor build
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: build_webseite_pr name: deploy
workspace:
path: /workspace
steps:
- name: build
image: registry.wtf-eg.net/lektor
image_pull_secrets:
- dockerconfig
trigger: trigger:
branch: event:
- main - promote
event:
- pull_request steps:
- name: deploy-live
image: python:3.10-alpine
environment:
LEKTOR_DEPLOY_KEY:
from_secret: drone_ssh_key
commands:
- apk add imagemagick
- python3 -m pip install --user pipx
- export PATH=/root/.local/bin:$PATH
- pipx install lektor
- lektor build
- apk add rsync openssh
- mkdir ~/.ssh
- echo "www.wtf-eg.net ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICBp7eSOC07exvXuY4XhpZOuXax+zyzoymSVD4/+D/P6" >> ~/.ssh/known_hosts
- lektor deploy live
when:
target:
- www
- name: deploy-dev
image: python:3.10-alpine
environment:
LEKTOR_DEPLOY_KEY:
from_secret: drone_ssh_key
commands:
- apk add imagemagick
- python3 -m pip install --user pipx
- export PATH=/root/.local/bin:$PATH
- pipx install lektor
- lektor build
- apk add rsync openssh
- mkdir ~/.ssh
- echo "www.wtf-eg.net ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICBp7eSOC07exvXuY4XhpZOuXax+zyzoymSVD4/+D/P6" >> ~/.ssh/known_hosts
- lektor deploy dev
when:
target:
- spielwiese
--- ---
kind: signature kind: signature
hmac: a7c0aeda778717207ec641e7af90a358376eb3bfb22beeb67217b6d201e9e675 hmac: 0d28bd52da692fb47e34b3fcb103df15005109a7cdaee3ea4a8a76a605660017
... ...