added drone config for deploy
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
John Shaver 2023-01-18 19:39:45 -08:00
parent 1b083cfb6f
commit b754f637d0

72
.drone.yml Normal file
View file

@ -0,0 +1,72 @@
#kind: pipeline
#type: docker
#name: deploy-staging
#
#trigger:
# branch:
# exclude:
# - master
# event:
# - push
#
#steps:
# - name: build-resume
# image: jshaver/root-browserless-chrome
# commands:
# - git submodule init
# - git submodule update --recursive --remote
# - sleep 25
# - "google-chrome --headless --enable-logging=stderr -v=1 --no-sandbox --disable-gpu --run-all-compositor-stages-before-draw --virtual-time-budget=20000 --print-to-pdf='./John-Shaver-Resume-2021.pdf' http://resume:8080/"
# - chmod 644 ./John-Shaver-Resume-2021.pdf
# - 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
# recursive: true
# args: "-v --files-from=deploy-list.txt"
#
#services:
# - name: resume
# image: node
# commands:
# - 'echo "running the command"'
# - "npx http-server"
#
#---
kind: pipeline
type: docker
name: deploy-master
trigger:
branch:
- master
event:
- push
steps:
- name: submodules
image: node:18
commands:
- npm run build
- name: deploy
image: drillster/drone-rsync
settings:
hosts:
- jshaver.net
user: deploy
key:
from_secret: deploy-key
source: ./build
target: /var/www/jshaver_net/pottychart
recursive: true
args: "-v --files-from=deploy-list.txt"