Files

93 lines
3.9 KiB
YAML
Raw Permalink Normal View History

2026-06-23 10:19:05 -05:00
when:
- event: push
branch: main
- event: manual
clone:
git:
image: woodpeckerci/plugin-git
settings:
skip-verify: true
2026-06-23 10:19:05 -05:00
steps:
notify-start:
2026-06-23 10:32:39 -05:00
image: node:24-bookworm
2026-06-23 10:19:05 -05:00
environment:
DEPLOY_TARGET_URL: http://bone-kingdom.tabitha.tealthrone/
DISCORD_DEPLOY_WEBHOOK_URL:
from_secret: discord_deploy_webhook_url
commands:
- sh scripts/woodpecker/notify-discord.sh started "Bone Kingdom Deploy Started" 5793266
validate:
image: node:24-bookworm
2026-06-24 15:35:08 -05:00
environment:
VITE_TOOLKIT_SOCKET_URL: http://bone-kingdom.tabitha.tealthrone:5174
2026-06-23 10:19:05 -05:00
commands:
- npm ci
- npm run lint
- npm run test -- --runInBand
- npm run web:build
2026-06-24 15:35:08 -05:00
- npm run deploy:frontend-health
2026-06-23 10:19:05 -05:00
deploy:
2026-06-23 10:32:39 -05:00
image: node:24-bookworm
2026-06-23 10:19:05 -05:00
environment:
DEPLOY_TARGET_URL: http://bone-kingdom.tabitha.tealthrone/
2026-06-24 15:35:08 -05:00
DEPLOY_TOOLKIT_SOCKET_URL: http://bone-kingdom.tabitha.tealthrone:5174
2026-06-23 10:32:39 -05:00
DEPLOY_HOST: 100.108.87.106
DEPLOY_USER: Tabitha
2026-06-24 15:35:08 -05:00
DEPLOY_REPO_PATH: /Users/Tabitha/.openclaw/workspace_father/blb-throne-of-the-bone-king
2026-06-23 10:32:39 -05:00
DEPLOY_PATH: /Users/Tabitha/.openclaw/workspace_father/blb-throne-of-the-bone-king/dist/renderer
DEPLOY_SSH_PRIVATE_KEY:
from_secret: deploy_ssh_private_key
2026-06-23 10:19:05 -05:00
commands:
2026-06-23 10:32:39 -05:00
- apt-get update
- apt-get install -y --no-install-recommends openssh-client rsync
2026-06-23 10:19:05 -05:00
- test -d dist/renderer
2026-06-23 10:32:39 -05:00
- mkdir -p ~/.ssh
- printf '%s\n' "$DEPLOY_SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
- chmod 600 ~/.ssh/id_ed25519
- ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts
- ssh "$DEPLOY_USER@$DEPLOY_HOST" "mkdir -p '$DEPLOY_PATH'"
- rsync -az --delete dist/renderer/ "$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/"
2026-06-24 15:35:08 -05:00
- rsync -az package.json package-lock.json "$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_REPO_PATH/"
- rsync -az --delete socket/ "$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_REPO_PATH/socket/"
- rsync -az --delete scripts/deploy/ "$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_REPO_PATH/scripts/deploy/"
- rsync -az --ignore-existing src/data/toolkit/ "$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_REPO_PATH/src/data/toolkit/"
- rsync -az --ignore-existing src/assets/images/uploads/ "$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_REPO_PATH/src/assets/images/uploads/"
- rsync -az --ignore-existing src/assets/music/uploads/ "$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_REPO_PATH/src/assets/music/uploads/"
- ssh "$DEPLOY_USER@$DEPLOY_HOST" "cd '$DEPLOY_REPO_PATH' && TOOLKIT_SOCKET_HOST=0.0.0.0 TOOLKIT_SOCKET_PORT=5174 TOOLKIT_SOCKET_CORS_ORIGIN='http://127.0.0.1:5173,http://localhost:5173,http://bone-kingdom.tabitha.tealthrone' sh scripts/deploy/restart-toolkit-socket.sh '$DEPLOY_REPO_PATH'"
- curl -fsS "$DEPLOY_TOOLKIT_SOCKET_URL/health" >/tmp/bone-kingdom-socket-health.json
- grep -q '"ok":true' /tmp/bone-kingdom-socket-health.json
2026-06-23 10:19:05 -05:00
- curl -fsS "$DEPLOY_TARGET_URL" >/tmp/bone-kingdom-index.html
- grep -q '<div id="root">' /tmp/bone-kingdom-index.html
2026-06-24 16:06:32 -05:00
- curl -fsS "$DEPLOY_TARGET_URL"health >/tmp/bone-kingdom-frontend-health.json
2026-06-24 15:35:08 -05:00
- grep -q '"ok":true' /tmp/bone-kingdom-frontend-health.json
2026-06-23 10:19:05 -05:00
depends_on:
- validate
notify-success:
2026-06-23 10:32:39 -05:00
image: node:24-bookworm
2026-06-23 10:19:05 -05:00
environment:
DEPLOY_TARGET_URL: http://bone-kingdom.tabitha.tealthrone/
DISCORD_DEPLOY_WEBHOOK_URL:
from_secret: discord_deploy_webhook_url
commands:
- sh scripts/woodpecker/notify-discord.sh succeeded "Bone Kingdom Deploy Succeeded" 5763719
depends_on:
- deploy
when:
status: [success]
notify-failure:
2026-06-23 10:32:39 -05:00
image: node:24-bookworm
2026-06-23 10:19:05 -05:00
environment:
DEPLOY_TARGET_URL: http://bone-kingdom.tabitha.tealthrone/
DISCORD_DEPLOY_WEBHOOK_URL:
from_secret: discord_deploy_webhook_url
commands:
- sh scripts/woodpecker/notify-discord.sh failed "Bone Kingdom Deploy Failed" 15158332
when:
status: [failure]