Replace CRA boilerplate with custom dashboard setup, remove unused files, and add new styles and components.
Some checks failed
continuous-integration/drone Build was killed
Some checks failed
continuous-integration/drone Build was killed
This commit is contained in:
57
.drone.yml
Normal file
57
.drone.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: deploy-backoffice
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
|
||||
steps:
|
||||
- name: deploying-project
|
||||
image: alpine
|
||||
environment:
|
||||
SSH_USERNAME:
|
||||
from_secret: ssh_username
|
||||
SSH_HOSTNAME:
|
||||
from_secret: ssh_hostname
|
||||
SSH_PRIVATE_KEY:
|
||||
from_secret: ssh_id_rsa
|
||||
commands:
|
||||
- apk add --no-cache rsync openssh
|
||||
- mkdir -p ~/.ssh
|
||||
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
||||
- chmod 600 ~/.ssh/id_rsa
|
||||
- |
|
||||
rsync -avz --delete \
|
||||
-e "ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa" \
|
||||
./ $SSH_USERNAME@$SSH_HOSTNAME:/var/www/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME} \
|
||||
--exclude .git \
|
||||
--exclude node_modules \
|
||||
--exclude .drone.yml
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- push
|
||||
|
||||
- name: restarting-project
|
||||
image: alpine
|
||||
environment:
|
||||
SSH_USERNAME:
|
||||
from_secret: ssh_username
|
||||
SSH_HOSTNAME:
|
||||
from_secret: ssh_hostname
|
||||
SSH_PRIVATE_KEY:
|
||||
from_secret: ssh_id_rsa
|
||||
commands:
|
||||
- apk add --no-cache openssh
|
||||
- mkdir -p ~/.ssh
|
||||
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
||||
- chmod 600 ~/.ssh/id_rsa
|
||||
- CONTAINER_NAME="${DRONE_REPO_OWNER}_${DRONE_REPO_NAME}"
|
||||
- ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa $SSH_USERNAME@$SSH_HOSTNAME "docker restart $CONTAINER_NAME"
|
||||
when:
|
||||
branch:
|
||||
- develop
|
||||
event:
|
||||
- push
|
||||
Reference in New Issue
Block a user