66 lines
1.9 KiB
YAML
66 lines
1.9 KiB
YAML
when:
|
|
- event: push
|
|
branch: main
|
|
- event: manual
|
|
|
|
steps:
|
|
notify-start:
|
|
image: python:3.12-alpine
|
|
environment:
|
|
DEPLOY_TARGET_URL: http://bone-kingdom.tabitha.tealthrone/
|
|
DISCORD_DEPLOY_WEBHOOK_URL:
|
|
from_secret: discord_deploy_webhook_url
|
|
commands:
|
|
- apk add --no-cache curl
|
|
- sh scripts/woodpecker/notify-discord.sh started "Bone Kingdom Deploy Started" 5793266
|
|
|
|
validate:
|
|
image: node:24-bookworm
|
|
commands:
|
|
- npm ci
|
|
- npm run lint
|
|
- npm run test -- --runInBand
|
|
- npm run web:build
|
|
|
|
deploy:
|
|
image: alpine:3.20
|
|
environment:
|
|
DEPLOY_TARGET_URL: http://bone-kingdom.tabitha.tealthrone/
|
|
volumes:
|
|
- /Users/Tabitha/.openclaw/workspace_father/blb-throne-of-the-bone-king/dist/renderer:/deploy-target
|
|
commands:
|
|
- apk add --no-cache curl rsync
|
|
- test -d dist/renderer
|
|
- mkdir -p /deploy-target
|
|
- rsync -a --delete dist/renderer/ /deploy-target/
|
|
- curl -fsS "$DEPLOY_TARGET_URL" >/tmp/bone-kingdom-index.html
|
|
- grep -q '<div id="root">' /tmp/bone-kingdom-index.html
|
|
depends_on:
|
|
- validate
|
|
|
|
notify-success:
|
|
image: python:3.12-alpine
|
|
environment:
|
|
DEPLOY_TARGET_URL: http://bone-kingdom.tabitha.tealthrone/
|
|
DISCORD_DEPLOY_WEBHOOK_URL:
|
|
from_secret: discord_deploy_webhook_url
|
|
commands:
|
|
- apk add --no-cache curl
|
|
- sh scripts/woodpecker/notify-discord.sh succeeded "Bone Kingdom Deploy Succeeded" 5763719
|
|
depends_on:
|
|
- deploy
|
|
when:
|
|
status: [success]
|
|
|
|
notify-failure:
|
|
image: python:3.12-alpine
|
|
environment:
|
|
DEPLOY_TARGET_URL: http://bone-kingdom.tabitha.tealthrone/
|
|
DISCORD_DEPLOY_WEBHOOK_URL:
|
|
from_secret: discord_deploy_webhook_url
|
|
commands:
|
|
- apk add --no-cache curl
|
|
- sh scripts/woodpecker/notify-discord.sh failed "Bone Kingdom Deploy Failed" 15158332
|
|
when:
|
|
status: [failure]
|