bonfire/.drone.yml
light7734 34c08e1fbc
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
ci: fix deployment pipelines (i hope)
2025-08-17 19:19:10 +03:30

62 lines
1.4 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 ./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
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 ./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'