You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
760 B
42 lines
760 B
kind: pipeline
|
|
type: docker
|
|
name: "CI and Deploy on maxou.dev"
|
|
|
|
volumes:
|
|
- name: server
|
|
temp: { }
|
|
|
|
trigger:
|
|
event:
|
|
- push
|
|
|
|
steps:
|
|
- image: node:latest
|
|
name: "front CI"
|
|
commands:
|
|
- npm install
|
|
- npm run tsc
|
|
|
|
- image: node:latest
|
|
name: "build react"
|
|
volumes: &outputs
|
|
- name: server
|
|
path: /outputs
|
|
depends_on:
|
|
- "front CI"
|
|
commands:
|
|
- npm run build -- --base=/$DRONE_BRANCH
|
|
- mv dist/* /outputs
|
|
|
|
|
|
- image: eeacms/rsync:latest
|
|
name: Deliver on staging server branch
|
|
depends_on:
|
|
- "build react"
|
|
volumes: *outputs
|
|
environment:
|
|
SERVER_PRIVATE_KEY:
|
|
from_secret: SERVER_PRIVATE_KEY
|
|
commands:
|
|
- chmod +x ci/deploy.sh
|
|
- ci/deploy.sh |