2020-08-11 16:14:38 +02:00
|
|
|
kind: pipeline
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: cache-restore
|
2020-09-12 13:30:31 +02:00
|
|
|
image: plugins/s3-cache
|
2020-08-11 16:14:38 +02:00
|
|
|
settings:
|
|
|
|
pull: true
|
|
|
|
endpoint: https://s3.sbruder.de
|
|
|
|
access_key:
|
|
|
|
from_secret: aws_access_key_id
|
|
|
|
secret_key:
|
|
|
|
from_secret: aws_secret_access_key
|
|
|
|
restore: true
|
|
|
|
|
|
|
|
- name: build
|
|
|
|
image: alpine
|
|
|
|
commands:
|
|
|
|
- set -e
|
|
|
|
- echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
|
|
|
|
- apk add --no-cache git git-lfs jq py3-pip py3-virtualenv unzip wget zola
|
2020-08-24 23:02:08 +02:00
|
|
|
- pip3 install --no-cache-dir mutagen
|
2020-08-11 16:14:38 +02:00
|
|
|
- wget -qO - https://raw.githubusercontent.com/MestreLion/git-tools/master/git-restore-mtime | python3 -
|
|
|
|
- ./vendor.sh
|
|
|
|
- ./build.sh
|
|
|
|
- '[ "$DRONE_COMMIT_BRANCH" = "master" ] || zola build -u "https://${DRONE_COMMIT}--schulpodcast.netlify.app"'
|
|
|
|
|
2020-10-24 21:46:38 +02:00
|
|
|
- name: publish-rsync-prod
|
|
|
|
image: drillster/drone-rsync
|
|
|
|
settings:
|
2020-11-24 21:22:59 +01:00
|
|
|
hosts: [ "schulischer-schabernack.de" ]
|
2020-10-24 21:46:38 +02:00
|
|
|
user: deploy
|
|
|
|
key:
|
|
|
|
from_secret: deploy_key
|
|
|
|
source: public/
|
|
|
|
target: . # set by rrsync
|
|
|
|
args: [ "-v" ]
|
|
|
|
delete: true
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
|
|
|
|
- name: publish-netlify-prod
|
2020-08-11 16:14:38 +02:00
|
|
|
image: r.sbruder.de/drone-netlify
|
|
|
|
settings:
|
|
|
|
auth_token:
|
|
|
|
from_secret: netlify_auth_token
|
|
|
|
dir: public
|
|
|
|
prod: 1
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
|
2020-10-24 21:46:38 +02:00
|
|
|
- name: publish-netlify-preview
|
2020-08-11 16:14:38 +02:00
|
|
|
image: r.sbruder.de/drone-netlify
|
|
|
|
settings:
|
|
|
|
auth_token:
|
|
|
|
from_secret: netlify_auth_token
|
|
|
|
dir: public
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
exclude:
|
|
|
|
- master
|
|
|
|
|
|
|
|
- name: cache-rebuild
|
2020-09-12 13:30:31 +02:00
|
|
|
image: plugins/s3-cache
|
2020-08-11 16:14:38 +02:00
|
|
|
settings:
|
|
|
|
pull: true
|
|
|
|
endpoint: https://s3.sbruder.de
|
|
|
|
access_key:
|
|
|
|
from_secret: aws_access_key_id
|
|
|
|
secret_key:
|
|
|
|
from_secret: aws_secret_access_key
|
|
|
|
rebuild: true
|
|
|
|
mount:
|
|
|
|
- static/episodes
|
|
|
|
|
|
|
|
- name: cache-flush
|
2020-09-12 13:30:31 +02:00
|
|
|
image: plugins/s3-cache
|
2020-08-11 16:14:38 +02:00
|
|
|
settings:
|
|
|
|
pull: true
|
|
|
|
endpoint: https://s3.sbruder.de
|
|
|
|
access_key:
|
|
|
|
from_secret: aws_access_key_id
|
|
|
|
secret_key:
|
|
|
|
from_secret: aws_secret_access_key
|
|
|
|
flush: true
|
|
|
|
flush_age: 14
|