ci-demo-2/.woodpecker/.frontend.yml

62 lines
1.1 KiB
YAML

---
when:
path: "frontend/**"
variables:
- &frontend_image "cl00e9ment/node.js-builder:git"
clone:
git:
image: woodpeckerci/plugin-git
settings:
skip_verify: true
steps:
"prepare":
image: *frontend_image
commands:
- pnpm install
directory: frontend
"lint:style":
image: *frontend_image
commands:
- pnpm run prettier
directory: frontend
"lint:analyze":
image: *frontend_image
commands:
- pnpm run lint
directory: frontend
"build:frontend":
image: *frontend_image
commands:
- pnpm run build
directory: frontend
"build:tsc":
image: *frontend_image
commands:
- pnpm add typescript
- pnpm run typecheck
directory: frontend
"analyze:sbom":
image: *frontend_image
commands:
- rm -rf node_modules
- npm install
- npx @cyclonedx/cyclonedx-npm --output-file bom.json
directory: frontend
"deploy:frontend":
image: alpine:latest
commands:
- echo "deploy frontend"
- env
directory: frontend
when:
- event: [manual]
depends_on:
- "lint_general"