Files
front/.drone.yml
admin 0c364fd36c
All checks were successful
continuous-integration/drone/push Build is passing
ц
2026-04-07 11:45:56 +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
- 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 8000:80 gitea.allowlgroup.ru/allowlgroup/front:latest
depends_on:
- docker-build
when:
branch:
- main
event:
- push