sergio.am/.drone.yml

41 lines
637 B
YAML
Raw Normal View History

2022-05-11 18:02:32 +00:00
---
kind: pipeline
type: docker
2022-05-15 12:49:22 +00:00
name: deploy-jekyll-sergio.am
2022-05-11 17:56:50 +00:00
2022-05-11 18:02:32 +00:00
steps:
2022-05-15 16:25:34 +00:00
- name: build
image: ruby:latest
2022-05-15 12:43:59 +00:00
volumes:
2022-05-15 12:55:04 +00:00
- name: bundle-cache
2022-05-15 12:43:59 +00:00
path: /cache
2022-05-11 18:02:32 +00:00
commands:
2022-05-15 16:25:34 +00:00
- bundle config set --local path /cache/.bundle
2022-05-15 13:08:08 +00:00
- bundle env
2022-05-11 18:02:32 +00:00
- bundle install
2022-05-16 09:17:03 +00:00
- ls -la /cache/.bundle
2022-05-11 18:02:32 +00:00
- bundle exec jekyll build
2022-05-15 12:43:59 +00:00
2022-05-16 09:44:36 +00:00
- name: deploy
image: busybox
volumes:
- name: www
path: /tmp/www
commands:
- rsync -av --delete _site/* /tmp/www/
2022-05-15 12:43:59 +00:00
when:
branch:
- main
2022-05-11 18:04:54 +00:00
node:
location: marley
2022-05-15 12:43:59 +00:00
volumes:
2022-05-15 12:55:04 +00:00
- name: bundle-cache
2022-05-15 12:43:59 +00:00
host:
2022-05-15 13:15:37 +00:00
path: /var/lib/drone/temp/ruby-bundle-cache-sergio.am
2022-05-16 09:44:36 +00:00
- name: www
host:
path: /var/www