ng-pokemon-app/.drone.yml
Lucien Cartier-Tilet fa05625224
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
Add CD
2023-02-27 16:03:59 +01:00

60 lines
1.0 KiB
YAML

---
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