ManiCandles/.drone.yml

54 lines
1.0 KiB
YAML

kind: pipeline
type: docker
name: Build Image
steps:
- name: Quality gates
image: node:24-alpine
environment:
# Keep jsdom suites from competing for CPU on the Drone runner.
VITEST_MAX_WORKERS: "1"
commands:
- npm ci
- npm audit --audit-level=high
- npm run check
- name: Build Docker Image
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: git.midastix.com/ci-docker-repo-user/manicandles
registry: git.midastix.com
when:
branch:
- main
event:
- push
- name: Deploy image
image: appleboy/drone-ssh
settings:
host: server1.midastix.com
username: mihir
key:
from_secret: manicandles_deploy_key
port: 22
command_timeout: 5m
script_stop: true
script:
- whoami
- hostname
- echo "ManiCandles SSH authentication successful"
when:
branch:
- main
event:
- push