www.kontakt-bamberg.de/.drone.yml

63 lines
1.3 KiB
YAML
Raw Normal View History

2023-03-12 00:14:05 +01:00
---
kind: pipeline
type: docker
name: default
steps:
2023-03-26 18:30:51 +02:00
- name: load cache ssh key
image: alpine:3.17
commands:
- mkdir -p .ssh
- echo "$CACHE_SSH_KEY" > .ssh/id_cache
environment:
CACHE_SSH_KEY:
from_secret: cache_ssh_key
2023-03-26 18:18:05 +02:00
- name: restore cache
image: meltwater/drone-cache
environment: &cache_env
2023-03-26 18:22:17 +02:00
SFTP_AUTH_METHOD: PUBLIC_KEY_FILE
2023-03-26 18:18:05 +02:00
SFTP_HOST: u194355-sub5.your-storagebox.de
SFTP_PORT: '23'
settings:
<<: &cache_settings
backend: sftp
mount:
- resources/_gen
2023-03-26 18:30:51 +02:00
public_key_file: .ssh/id_cache
2023-03-26 18:18:05 +02:00
username: u194355-sub5
restore: yes
2023-03-12 00:14:05 +01:00
- name: build
image: klakegg/hugo:ext-alpine-ci
commands:
- hugo --baseURL="https://staging.www.kontakt-bamberg.de/"
2023-03-26 18:18:05 +02:00
- name: rebuild cache
image: meltwater/drone-cache
environment: *cache_env
settings:
<<: *cache_settings
rebuild: yes
2023-03-12 00:14:05 +01:00
- name: deploy
image: appleboy/drone-scp
settings:
host: dragon.luj0ga.de
port: 4222
username: www-data
key:
from_secret: ssh_key
passphrase:
from_secret: ssh_passphrase
target: /var/www/staging.www.kontakt-bamberg.de/
source: public/*
strip_components: 1
rm: yes
when:
event:
- push
branch:
- main