generated from VLADIMIR/template_frontend
update ci
This commit is contained in:
+78
@@ -0,0 +1,78 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: install
|
||||||
|
image: node:22
|
||||||
|
commands:
|
||||||
|
- npm ci
|
||||||
|
|
||||||
|
- name: type-check
|
||||||
|
image: node:22
|
||||||
|
commands:
|
||||||
|
- npm run type-check
|
||||||
|
|
||||||
|
- name: lint
|
||||||
|
image: node:22
|
||||||
|
commands:
|
||||||
|
- ./node_modules/.bin/eslint .
|
||||||
|
|
||||||
|
- name: lint-css
|
||||||
|
image: node:22
|
||||||
|
commands:
|
||||||
|
- ./node_modules/.bin/stylelint "src/**/*.{css,scss,vue}"
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
image: node:22
|
||||||
|
commands:
|
||||||
|
- npm run build-only
|
||||||
|
|
||||||
|
- name: scp
|
||||||
|
image: appleboy/drone-scp
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: server_ip
|
||||||
|
username:
|
||||||
|
from_secret: ssh_user
|
||||||
|
key:
|
||||||
|
from_secret: ssh_key
|
||||||
|
port:
|
||||||
|
from_secret: ssh_port
|
||||||
|
target:
|
||||||
|
- deploys/evening_detective_frontend
|
||||||
|
source:
|
||||||
|
- dist
|
||||||
|
- docker-compose.yml
|
||||||
|
rm: true
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: server_ip
|
||||||
|
username:
|
||||||
|
from_secret: ssh_user
|
||||||
|
key:
|
||||||
|
from_secret: ssh_key
|
||||||
|
port:
|
||||||
|
from_secret: ssh_port
|
||||||
|
command_timeout: 10s
|
||||||
|
script:
|
||||||
|
- cd deploys/evening_detective_frontend
|
||||||
|
- docker compose up -d --force-recreate
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- pull_request
|
||||||
Reference in New Issue
Block a user