Files
front/.drone.yml
admin bf9d63e635
Some checks failed
continuous-integration/drone Build is failing
add
2026-04-07 11:15:50 +10:00

61 lines
1.3 KiB
YAML

kind: pipeline
type: docker
name: default
steps:
- name: install-deps
image: node:22-alpine
commands:
- npm install
- name: build
image: node:22-alpine
commands:
- npm run build
depends_on:
- install-deps
- name: docker-build
image: plugins/docker
settings:
repo: gitea.allowlgroup.ru/allowlgroup/front
registry: https://gitea.allowlgroup.ru
insecure: true
tags:
- latest
- ${DRONE_COMMIT_SHA:0:8}
username:
from_secret: docker_username
password:
from_secret: docker_password
context: .
dockerfile: Dockerfile
depends_on:
- build
when:
branch:
- main
event:
- push
- custom
- name: deploy
image: appleboy/drone-ssh
settings:
host: allowlgroup.ru
username:
from_secret: ssh_username
password:
from_secret: ssh_password
port: 22
script:
- docker stop front || true
- docker rm front || true
- docker pull gitea.allowlgroup.ru/allowlgroup/front:latest
- docker run -d --name front -p 80:80 gitea.allowlgroup.ru/allowlgroup/front:latest
when:
branch:
- main
event:
- push
- custom