when: - event: push branch: main - event: manual clone: git: image: woodpeckerci/plugin-git settings: skip-verify: true steps: notify-start: image: node:24-bookworm 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 environment: VITE_TOOLKIT_SOCKET_URL: http://bone-kingdom.tabitha.tealthrone:5174 commands: - npm ci - npm run lint - npm run test -- --runInBand - npm run web:build - npm run deploy:frontend-health deploy: image: node:24-bookworm environment: DEPLOY_TARGET_URL: http://bone-kingdom.tabitha.tealthrone/ DEPLOY_TOOLKIT_SOCKET_URL: http://bone-kingdom.tabitha.tealthrone:5174 DEPLOY_HOST: 100.108.87.106 DEPLOY_USER: Tabitha DEPLOY_REPO_PATH: /Users/Tabitha/.openclaw/workspace_father/blb-throne-of-the-bone-king 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 commands: - apt-get update - apt-get install -y --no-install-recommends openssh-client rsync - test -d dist/renderer - 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/" - 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 - curl -fsS "$DEPLOY_TARGET_URL" >/tmp/bone-kingdom-index.html - grep -q '
' /tmp/bone-kingdom-index.html - curl -fsS "$DEPLOY_TARGET_URL"health >/tmp/bone-kingdom-frontend-health.json - grep -q '"ok":true' /tmp/bone-kingdom-frontend-health.json depends_on: - validate notify-success: image: node:24-bookworm 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: image: node:24-bookworm 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]