Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
b7f951b9c7 | |||
6f9cd8d0a1 |
1 changed files with 8 additions and 34 deletions
42
.drone.yml
42
.drone.yml
|
@ -1,7 +1,8 @@
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: deploy_dev
|
name: deploy_dev
|
||||||
|
node:
|
||||||
|
environment: ryali
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
|
@ -12,28 +13,15 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- npm install
|
- npm install
|
||||||
- npm run build
|
- npm run build
|
||||||
|
- rm -rf /bonfire_dev/*
|
||||||
- name: deploy
|
- mv ./build/* /bonfire_dev/
|
||||||
image: byteflair/scp
|
|
||||||
commands:
|
|
||||||
- mv ./build ./bonfire_dev_staging
|
|
||||||
|
|
||||||
# Stage
|
|
||||||
- ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/bonfire_dev_staging'
|
|
||||||
- scp -r './bonfire_dev_staging' 'light@5.75.206.84:/home/light/'
|
|
||||||
|
|
||||||
# Move to endpoint
|
|
||||||
- ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/bonfire_dev/*'
|
|
||||||
- ssh -tt 'light@5.75.206.84' 'sudo mv /home/light/bonfire_dev_staging/* /home/light/bonfire_dev/'
|
|
||||||
|
|
||||||
# Remove staging
|
|
||||||
- ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/bonfire_dev_staging'
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: deploy_prod
|
name: deploy_prod
|
||||||
|
node:
|
||||||
|
environment: ryali
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
|
@ -44,19 +32,5 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- npm install
|
- npm install
|
||||||
- npm run build
|
- npm run build
|
||||||
|
- rm -rf /bonfire/*
|
||||||
- name: deploy
|
- mv ./build/* /bonfire/
|
||||||
image: byteflair/scp
|
|
||||||
commands:
|
|
||||||
- mv ./build ./bonfire_staging
|
|
||||||
|
|
||||||
# Stage
|
|
||||||
- ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/bonfire_staging'
|
|
||||||
- scp -r './bonfire_staging' 'light@5.75.206.84:/home/light/'
|
|
||||||
|
|
||||||
# Move to endpoint
|
|
||||||
- ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/bonfire/*'
|
|
||||||
- ssh -tt 'light@5.75.206.84' 'sudo mv /home/light/bonfire_staging/* /home/light/bonfire/'
|
|
||||||
|
|
||||||
# Remove staging
|
|
||||||
- ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/bonfire_staging'
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue