ci: add deploy_dev and deploy_prod pipelines
Some checks failed
continuous-integration/drone Build is failing
Some checks failed
continuous-integration/drone Build is failing
This commit is contained in:
parent
7f920c01ad
commit
4a1ecdb811
1 changed files with 42 additions and 10 deletions
50
.drone.yml
50
.drone.yml
|
@ -1,13 +1,45 @@
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: default
|
name: deploy_dev
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build_deploy
|
- name: build
|
||||||
privileged: true
|
image: node:latest
|
||||||
image: node:latest
|
commands:
|
||||||
commands:
|
- npm install
|
||||||
- rm -rf ./node_modules
|
- npm run build
|
||||||
- npm install
|
|
||||||
- npm run build
|
- name: deploy
|
||||||
- cp -r ./build/* /dazzle/
|
image: byteflair/scp
|
||||||
|
commands:
|
||||||
|
- ssh 'light@5.75.206.84' 'rm -rf /home/light/dazzle_dev/*'
|
||||||
|
- mv ./build ./dazzle_dev
|
||||||
|
- scp -r './dazzle_dev/' 'light@5.75.206.84:/home/light/'
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: deploy_prod
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: node:latest
|
||||||
|
commands:
|
||||||
|
- npm install
|
||||||
|
- npm run build
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
image: byteflair/scp
|
||||||
|
commands:
|
||||||
|
- ssh 'light@5.75.206.84' 'rm -rf /home/light/dazzle/*'
|
||||||
|
- mv ./build .dazzle/
|
||||||
|
- scp -r './dazzle/' 'light@5.75.206.84:/home/light/'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue