bonfire/.drone.yml

63 lines
1.4 KiB
YAML
Raw Normal View History

kind: pipeline
2025-08-08 13:45:54 +03:30
type: docker
2025-08-08 14:25:00 +03:30
name: deploy_dev
2025-08-08 13:45:54 +03:30
trigger:
branch:
- main
steps:
2025-08-09 11:52:18 +03:30
- name: build
image: node:latest
commands:
- npm install
- npm run build
2025-08-08 13:45:54 +03:30
2025-08-09 11:52:18 +03:30
- name: deploy
image: byteflair/scp
commands:
2025-08-17 19:19:10 +03:30
- 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'
2025-08-08 14:25:00 +03:30
---
kind: pipeline
type: docker
name: deploy_prod
trigger:
event:
- tag
steps:
2025-08-09 11:52:18 +03:30
- name: build
image: node:latest
commands:
- npm install
- npm run build
2025-08-08 14:25:00 +03:30
2025-08-09 11:52:18 +03:30
- name: deploy
image: byteflair/scp
commands:
2025-08-17 19:19:10 +03:30
- 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'