This commit is contained in:
parent
e9b4fc55d6
commit
b125ba364b
3 changed files with 73 additions and 1 deletions
68
.drone.yml
Normal file
68
.drone.yml
Normal file
|
@ -0,0 +1,68 @@
|
|||
kind: pipeline
|
||||
type: docker
|
||||
name: deploy-staging
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
exclude:
|
||||
- master
|
||||
event:
|
||||
- push
|
||||
|
||||
steps:
|
||||
- name: build-resume
|
||||
image: browserless/chrome
|
||||
commands:
|
||||
- "sleep 6"
|
||||
- "chrome-browser --headless --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
|
||||
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: browserless/chrome
|
||||
commands:
|
||||
- "sleep 6"
|
||||
- "chrome-browser --headless --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"
|
4
deploy-list.txt
Normal file
4
deploy-list.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
./dep/
|
||||
./style.css
|
||||
index.html
|
||||
./John-Shaver-Resume-2021.pdf
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
npx http-server &
|
||||
sleep 6;
|
||||
chromium --headless --disable-gpu --run-all-compositor-stages-before-draw --print-to-pdf="./John-Shaver-Resume-2018.pdf" http://localhost:8080/ --virtual-time-budget=10000;
|
||||
chromium --headless --disable-gpu --run-all-compositor-stages-before-draw --print-to-pdf="./John-Shaver-Resume-2021.pdf" http://localhost:8080/ --virtual-time-budget=10000;
|
||||
kill %1;
|
||||
exit;
|
||||
|
||||
|
|
Loading…
Reference in a new issue