Adds redstone-link-addon: a transmitter/receiver pair bound by channel name, giving redstone that runs anywhere without wire, support blocks or line of sight. Bedrock custom blocks can read redstone power but cannot emit it, so a live receiver is swapped to a vanilla redstone_block and back; receiver positions persist in a world dynamic property, with a reconcile pass at boot to repair anything a crash left inconsistent. Deployed and proven end-to-end on lobby (Hub World). Also commits family-goals-addon, which was running on jamie -- mounted in docker-compose.yml and pinned in the world -- while existing in no commit on any branch. It was unbacked-up production code. That omission was load-bearing for deploys: deploy.yml checks out docker-compose.yml from origin/main, so a deploy would have replaced the host compose with a version lacking the family-goals mount and silently killed the addon. Both new directories are added to the workflow's PATHS and push-trigger list, so nothing is mounted that CI does not deliver. The mount set in this file now matches the live host exactly. Note for a follow-up: dynamite-, hemp-, naturalist-lite-, smart-crafting-, tow-boat- and trees-features-addon are mounted but absent from PATHS, so CI never refreshes them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Gf1kZypRDfPL1YiWUS1LC
63 lines
2.3 KiB
YAML
63 lines
2.3 KiB
YAML
name: Deploy Addons
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'addon/**'
|
|
- 'lobby-addon/**'
|
|
- 'hub-return-addon/**'
|
|
- 'village-evolution-addon/**'
|
|
- 'monkey-addon/**'
|
|
- 'private-chest-addon/**'
|
|
- 'home-sign-addon/**'
|
|
- 'keep-inventory-addon/**'
|
|
- 'postal-service-addon/**'
|
|
- 'camping-supplies-addon/**'
|
|
- 'family-goals-addon/**'
|
|
- 'redstone-link-addon/**'
|
|
- 'docker-compose.yml'
|
|
- 'scripts/**'
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Deploy via SSH
|
|
uses: appleboy/ssh-action@v1
|
|
with:
|
|
host: ${{ secrets.DEPLOY_HOST }}
|
|
username: ${{ secrets.DEPLOY_USER }}
|
|
password: ${{ secrets.DEPLOY_PASSWORD }}
|
|
port: 22
|
|
script: |
|
|
set -e
|
|
APP_DIR="$HOME/minecraft-multiworld"
|
|
# Anything mounted in docker-compose.yml but missing here is simply
|
|
# never refreshed by CI. family-goals-addon and redstone-link-addon
|
|
# are listed because docker-compose.yml mounts them; omitting either
|
|
# while checking out docker-compose.yml would leave a mount pointing
|
|
# at a directory this job never delivers.
|
|
PATHS="addon/ lobby-addon/ hub-return-addon/ village-evolution-addon/ monkey-addon/ private-chest-addon/ home-sign-addon/ keep-inventory-addon/ postal-service-addon/ camping-supplies-addon/ family-goals-addon/ redstone-link-addon/ docker-compose.yml"
|
|
|
|
# First run: clone. Subsequent: pull.
|
|
if [ ! -d "$APP_DIR/.git" ]; then
|
|
cd "$APP_DIR"
|
|
git init
|
|
git remote add origin https://git.silverlabs.uk/SilverLABS/minecraft-aiworld.git
|
|
git fetch origin main
|
|
git checkout -f origin/main -- $PATHS
|
|
else
|
|
cd "$APP_DIR"
|
|
git fetch origin main
|
|
git checkout -f origin/main -- $PATHS
|
|
fi
|
|
|
|
# Recreate containers so any new docker-compose volume mounts are applied,
|
|
# then restart remaining containers to pick up script changes
|
|
docker compose up -d --force-recreate
|
|
|
|
# Wait and verify
|
|
sleep 10
|
|
docker ps --filter "name=mc-" --format "{{.Names}}: {{.Status}}"
|