Files
iled-shop/.drone.yml
T
miczekandCursor b494cde365
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is passing
ci: use desktop resources; parallel shop/admin
Drop Pi memory knobs and build shop + admin in parallel after api.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-15 04:31:40 +03:00

123 lines
2.2 KiB
YAML

# Drone CI/CD for iLED shop
# Builds run on the Windows desktop agent (linux/amd64). Pi only hosts Drone.
kind: pipeline
type: docker
name: ci
platform:
os: linux
arch: amd64
dns:
- 192.168.0.64
clone:
depth: 50
concurrency:
limit: 1
steps:
- name: api
image: mcr.microsoft.com/dotnet/sdk:10.0
pull: false
environment:
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
DOTNET_NOLOGO: "1"
NUGET_PACKAGES: /drone-cache/nuget
NUGET_HTTP_CACHE_PATH: /drone-cache/nuget-http
DOTNET_CLI_HOME: /drone-cache/dotnet
NUGET_XMLDOC_MODE: skip
commands:
- cd src/backend
- dotnet restore iLED.slnx
- dotnet build iLED.slnx -c Release --no-restore
- name: shop
image: node:22-bookworm
pull: false
environment:
npm_config_cache: /drone-cache/npm
commands:
- cd src/shop
- npm ci --prefer-offline
- npm run build -- --configuration=production
depends_on:
- api
- name: admin
image: node:22-bookworm
pull: false
environment:
npm_config_cache: /drone-cache/npm
commands:
- cd src/admin
- npm ci --prefer-offline
- npm run build -- --configuration=production
depends_on:
- api
trigger:
event:
- push
- pull_request
- custom
---
kind: pipeline
type: docker
name: deploy
platform:
os: linux
arch: amd64
dns:
- 192.168.0.64
depends_on:
- ci
clone:
disable: true
concurrency:
limit: 1
steps:
- name: ssh-deploy
image: appleboy/drone-ssh
pull: false
settings:
host:
from_secret: ssh_host
username:
from_secret: ssh_user
key:
from_secret: ssh_key
port:
from_secret: ssh_port
script_stop: true
envs:
- DEPLOY_PATH
script:
- set -euo pipefail
- cd "${DEPLOY_PATH}"
- git fetch origin
- git checkout "${DRONE_COMMIT_SHA}"
- cd docker
- docker compose --profile full pull || true
- docker compose --profile full up -d --build --remove-orphans
- docker compose --profile full ps
environment:
DEPLOY_PATH:
from_secret: deploy_path
trigger:
branch:
- master
- main
event:
- push