html-resume/.drone.yml
John Shaver 3dedf41107
All checks were successful
continuous-integration/drone/push Build is passing
what version?
2021-06-20 21:59:28 -07:00

78 lines
1.7 KiB
YAML

kind: pipeline
type: docker
name: deploy-staging
trigger:
branch:
exclude:
- master
event:
- push
steps:
- name: build-resume
image: jshaver/root-browserless-chrome
commands:
- "sleep 10"
- "google-chrome --headless --no-sandbox --disable-gpu --run-all-compositor-stages-before-draw --print-to-pdf='./John-Shaver-Resume-2021.pdf' http://resume-server:8080/ --virtual-time-budget=10000;"
- name: deploy
image: drillster/drone-rsync
settings:
hosts:
- jshaver.net
user: deploy
key:
from_secret: deploy-key
source: ./
target: /var/www/jshaver_net/stage/${DRONE_BRANCH}/resume
prescript:
- mkdir -p /var/www/jshaver_net/stage/${DRONE_BRANCH}/resume
- rsync --version
recursive: true
args:
- "--files-from=deploy-list.txt"
services:
- name: resume-server
image: node
commands:
- "npx http-server"
---
kind: pipeline
type: docker
name: deploy-master
trigger:
branch:
- master
event:
- push
steps:
- name: build-resume
image: jshaver/root-browserless-chrome
commands:
- "sleep 10"
- "google-chrome --headless --no-sandbox --disable-gpu --run-all-compositor-stages-before-draw --print-to-pdf='./John-Shaver-Resume-2021.pdf' http://resume-server:8080/ --virtual-time-budget=10000;"
- name: deploy
image: drillster/drone-rsync
settings:
hosts:
- jshaver.net
user: deploy
key:
from_secret: deploy-key
source: ./
target: /var/www/jshaver_net/resume
recursive: true
args:
- "--files-from=deploy-list.txt"
services:
- name: resume-server
image: node
commands:
- "npx http-server"