2martens.de/.drone.yml

91 lines
1.9 KiB
YAML
Raw Normal View History

kind: pipeline
name: default
type: docker
2021-10-02 15:58:39 +02:00
clone:
skip_verify: true
steps:
- name: restore-cache
privileged: true
2021-10-02 15:36:57 +02:00
image: 2martens/drone-volume-cache
settings:
restore: true
mount:
- ./.bundle
- ./.yarn-cache
- ./node_modules
volumes:
- name: cache
path: /cache
- name: build
2020-11-11 21:12:58 +01:00
image: 2martens/ruby-node
environment:
BUNDLE_PATH: .bundle
commands:
- export LANG="C.UTF-8"
- export LC_ALL="C.UTF-8"
- ruby -e 'puts STDIN.external_encoding' # figure out the encoding used
2021-10-02 16:48:35 +02:00
- bundle update --bundler
- bundle install
- yarn config set cache-folder .yarn-cache
- yarn global add gulp-cli
- yarn install --frozen-lockfile
- gulp build
- name: rebuild-cache
privileged: true
2021-10-02 15:36:57 +02:00
image: 2martens/drone-volume-cache
settings:
rebuild: true
mount:
- .bundle
- .yarn-cache
- ./node_modules
volumes:
- name: cache
path: /cache
- name: deploy
image: drillster/drone-rsync
settings:
hosts: [ "wolf.uberspace.de" ]
user: martens7
source: /drone/src/_site/.
target: ~/tmp/build
recursive: true
delete: true
port: 22
2020-01-04 16:27:39 +01:00
key:
from_secret: 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
- name: notify
image: drillster/drone-email
environment:
EMAIL_USERNAME:
from_secret: email_username
EMAIL_PASSWORD:
from_secret: email_password
settings:
2020-01-04 13:11:13 +01:00
host: howell.uberspace.de
port: 587
from: Drone <drone@2martens.de>
secrets: [email_username, email_password]
when:
status: [ failure ]
volumes:
- name: cache
host:
path: /var/lib/drone/cache
trigger:
branch:
- master