From 29613ac472b69a909b216c42618eddd1397194c0 Mon Sep 17 00:00:00 2001 From: muli Date: Tue, 25 Oct 2022 16:54:45 +0200 Subject: [PATCH] feat: Updated drone configuration to match main branch. --- .drone.yml | 87 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 58 insertions(+), 29 deletions(-) diff --git a/.drone.yml b/.drone.yml index 00f9fc1a..5244aa12 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,46 +1,75 @@ --- kind: pipeline type: docker -name: build_webseite_main - -workspace: - path: /workspace - -steps: - - name: build - image: registry.wtf-eg.net/lektor - -image_pull_secrets: - - dockerconfig +name: build trigger: - branch: + branch: - main - event: + - spielwiese + event: - 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 type: docker -name: build_webseite_pr - -workspace: - path: /workspace - -steps: - - name: build - image: registry.wtf-eg.net/lektor - -image_pull_secrets: - - dockerconfig +name: deploy trigger: - branch: - - main - event: - - pull_request + event: + - promote + +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 -hmac: a7c0aeda778717207ec641e7af90a358376eb3bfb22beeb67217b6d201e9e675 +hmac: 0d28bd52da692fb47e34b3fcb103df15005109a7cdaee3ea4a8a76a605660017 ...