feat(ci): add Drone CI/CD pipeline for frontend
This commit is contained in:
42
.drone.yml
Normal file
42
.drone.yml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: frontend-pipeline
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: lint-frontend
|
||||||
|
image: node:20-alpine
|
||||||
|
working_dir: /workspace/frontend
|
||||||
|
commands:
|
||||||
|
- npm ci
|
||||||
|
- npm run lint
|
||||||
|
volumes:
|
||||||
|
- name: node_modules
|
||||||
|
path: /workspace/frontend/node_modules
|
||||||
|
|
||||||
|
- name: build-frontend
|
||||||
|
image: node:20-alpine
|
||||||
|
working_dir: /workspace/frontend
|
||||||
|
commands:
|
||||||
|
- npm ci
|
||||||
|
- npm run build
|
||||||
|
volumes:
|
||||||
|
- name: node_modules
|
||||||
|
path: /workspace/frontend/node_modules
|
||||||
|
depends_on:
|
||||||
|
- lint-frontend
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: node_modules
|
||||||
|
temp: {}
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
- develop
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- pull_request
|
||||||
Reference in New Issue
Block a user