Introduce a Woodpecker CI/CD pipeline in `.woodpecker.yml` for automated deployment on pushes to the main branch. Add new components for visualizing campaign performance, including `DailyPerformanceChart`, `InboxPlacementChart`, and `InboxVsSpamChart`, to enhance the Campaign Detail page. Update `WarmupPlanChart` to include additional metrics and improve tooltip information. Enhance utility functions for chart data formatting and daily statistics mapping.
32 lines
861 B
YAML
32 lines
861 B
YAML
# Woodpecker CI — Forgejo at https://git.jonnyn.com/
|
|
# Push to main → verify build → deploy on home server.
|
|
#
|
|
# Server prerequisites: see docs/deploy-ci-cd.md
|
|
|
|
when:
|
|
- event: push
|
|
branch: main
|
|
|
|
steps:
|
|
verify:
|
|
image: node:22-bookworm-slim
|
|
environment:
|
|
DATABASE_URL: file:/tmp/warmbox-ci.db
|
|
ENCRYPTION_KEY: "0000000000000000000000000000000000000000000000000000000000000000"
|
|
NODE_ENV: test
|
|
commands:
|
|
- npm ci
|
|
- npx prisma generate
|
|
- npm run build
|
|
- npm test
|
|
|
|
deploy:
|
|
image: docker:27-cli
|
|
depends_on: [verify]
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- /srv/docker-configs/warmbox:/deploy
|
|
commands:
|
|
- apk add --no-cache git bash
|
|
- chmod +x /deploy/scripts/deploy.sh
|
|
- DEPLOY_DIR=/deploy DEPLOY_BRANCH=main bash /deploy/scripts/deploy.sh
|