Add dev site deploy to Drone CI config
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit is contained in:
Garrett Mills 2020-10-05 18:02:52 -05:00
parent 11bdcf8eae
commit 288c6ae2eb
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

View File

@ -1,6 +1,7 @@
kind: pipeline kind: pipeline
name: default name: default
steps: steps:
# ============ BUILD STEPS ===============
- name: build-prod - name: build-prod
image: node:14 image: node:14
commands: commands:
@ -8,6 +9,8 @@ steps:
- npm install @ionic/cli - npm install @ionic/cli
- ./node_modules/.bin/ionic build --prod - ./node_modules/.bin/ionic build --prod
- tar czf build.tar.gz www - tar czf build.tar.gz www
# =============== RELEASE ===============
- name: release - name: release
image: plugins/gitea-release image: plugins/gitea-release
settings: settings:
@ -18,6 +21,25 @@ steps:
title: ${DRONE_TAG} title: ${DRONE_TAG}
when: when:
event: tag event: tag
# =============== DEPLOY TO DEV SITE ===============
- name: copy artifacts to staging site
image: appleboy/drone-scp
settings:
host:
from_secret: dev_site_host
username:
from_secret: dev_site_user
key:
from_secret: dev_site_key
port: 22
source: build.tar.gz
target: /etc/glmdev/noded
when:
event: promote
target: staging
# =============== NOTIFICATIONS ===============
- name: send success notifications - name: send success notifications
image: plugins/webhook image: plugins/webhook
settings: settings:
@ -45,18 +67,4 @@ steps:
"priority": 6 "priority": 6
} }
when: when:
status: failure status: failure
# - name: promote Flitter docs
# image: plugins/downstream
# settings:
# server: https://ci.garrettmills.dev
# token:
# from_secret: drone_token
# fork: false
# last_successful: true
# deploy: production
# repositories:
# - flitter/docs@master
# when:
# status: success
# event: tag