sergio.am/.drone.yml

40 lines
611 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-11 18:02:32 +00:00
- bundle install
- 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:
2022-05-16 11:51:22 +00:00
- rm -rf /tmp/www/_site
2022-05-16 13:27:37 +00:00
- cp -r _site /tmp/www/_site
2022-05-16 09:44:36 +00:00
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