57 lines
1.3 KiB
YAML
57 lines
1.3 KiB
YAML
pipeline:
|
|
restore-cache:
|
|
privileged: true
|
|
image: drillster/drone-volume-cache
|
|
restore: true
|
|
mount:
|
|
- /drone/.bundle
|
|
volumes:
|
|
- jekyll-blog-cache:/cache
|
|
build:
|
|
image: ruby
|
|
environment:
|
|
- BUNDLE_PATH=/drone/.bundle
|
|
commands:
|
|
- export LANG="C.UTF-8"
|
|
- export LC_ALL="C.UTF-8"
|
|
- ruby -e 'puts STDIN.external_encoding' # figure out the encoding used
|
|
- bundle install
|
|
- JEKYLL_ENV=production bundle exec jekyll build && bundle exec htmlproofer _site/ --disable-external
|
|
rebuild-cache:
|
|
privileged: true
|
|
image: drillster/drone-volume-cache
|
|
rebuild: true
|
|
mount:
|
|
- /drone/.bundle
|
|
volumes:
|
|
- jekyll-blog-cache:/cache
|
|
deploy:
|
|
image: drillster/drone-rsync
|
|
hosts: [ "wolf.uberspace.de" ]
|
|
user: martens7
|
|
source: ./_site/.
|
|
target: ~/tmp/build
|
|
recursive: true
|
|
delete: true
|
|
secrets: [ rsync_key ]
|
|
script:
|
|
- shopt -s dotglob
|
|
- rm -rf tmp/old.build
|
|
- mkdir tmp/old.build
|
|
- cp -r html/* tmp/old.build/
|
|
- rm -rf html/*
|
|
- cp -r tmp/build/* html/
|
|
- rm -rf tmp/build
|
|
notify:
|
|
image: drillster/drone-email
|
|
host: peacock.uberspace.de
|
|
port: 587
|
|
from: Drone <drone@2martens.de>
|
|
secrets: [email_username, email_password]
|
|
when:
|
|
status: [ failure ]
|
|
|
|
branches: master
|
|
|
|
|