dazzle/.drone.yml
light7734 99391b4cb8
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is passing
ci: fix deploy prod
2025-08-17 15:23:59 +03:30

63 lines
1.5 KiB
YAML

kind: pipeline
type: docker
name: deploy_dev
trigger:
branch:
- main
steps:
- name: build
image: node:latest
commands:
- npm install
- npm run build
- name: deploy
image: byteflair/scp
commands:
- mv ./build ./dazzle_dev_staging
# Stage
- ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/dazzle_dev_staging'
- scp -r './dazzle_dev_staging' 'light@5.75.206.84:/home/light/'
# Move to endpoint
- ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/dazzle_dev/*'
- ssh -tt 'light@5.75.206.84' 'sudo mv /home/light/dazzle_dev_staging/* /home/light/dazzle_dev/'
- ssh -tt 'light@5.75.206.84' 'sudo chmod -R 755 /home/light/dazzle_dev/*'
# Remove staging
- ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/dazzle_dev_staging'
---
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:
- mv ./build ./dazzle_staging
# Stage
- ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/dazzle_staging'
- scp -r './dazzle_staging' 'light@5.75.206.84:/home/light/'
# Move to endpoint
- ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/dazzle_dev/*'
- ssh -tt 'light@5.75.206.84' 'sudo mv /home/light/dazzle_staging/* /home/light/dazzle_dev/'
- ssh -tt 'light@5.75.206.84' 'sudo chmod -R 755 /home/light/dazzle_dev/*'
# Remove staging
- ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/dazzle_staging'