Add CD
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details

This commit is contained in:
Lucien Cartier-Tilet 2023-02-27 16:03:59 +01:00
parent b5d062ebca
commit fa05625224
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
1 changed files with 59 additions and 0 deletions

59
.drone.yml Normal file
View File

@ -0,0 +1,59 @@
---
kind: pipeline
type: docker
name: CD
steps:
- name: restore cache
image: drillster/drone-volume-cache
volumes:
- name: ng-pokemon-app-node
path: /cache/ng-pokemon-app/node
settings:
restore: true
mount:
- ./node_modules
- name: generate
image: node:19-alpine
commands:
- npm install
- npm run ng build
depends_on:
- "restore cache"
- name: rebuild cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount:
- ./node_modules
depends_on:
- generate
- name: deploy stable
image: appleboy/drone-scp
settings:
host:
from_secret: ssh_host
target:
from_secret: ssh_target
source: dist/ng-pokemon-app/*
strip_components: 2
username:
from_secret: ssh_username
password:
from_secret: ssh_password
port:
from_secret: ssh_port
depends_on:
- generate
when:
branch:
- main
event:
exclude:
- pull_request