Files
minecraft-aiworld/.gitea/workflows/deploy.yml
T
sysadminandClaude Opus 5 f67249c8db ci: cover every mounted addon in the deploy PATHS
Six addons were bind-mounted in docker-compose.yml but absent from the deploy
workflow, so CI had never deployed them: dynamite, hemp, naturalist-lite,
smart-crafting, tow-boat and trees-features. The host was consequently running
April copies of files that main had moved on from in August -- dynamite's
thrown entities still used item_sprite geometry rather than snowball, and
smart-crafting's recipe still used AlwaysUnlocked rather than unlocking from a
crafting table.

That gap also silently broke dynamite: the world pins had been advanced to RP
1.0.2 while the host stayed on 1.0.1, so the pack was dropped from every world
until the pins were corrected earlier today.

Verified before adding, rather than trusting the workflow: tow-boat and
trees-features are byte-identical between host and main, and for the other
four main is strictly newer (host files date from April, main's from August).
The only host-only files are three strays that checkout -f will not remove --
sloth.bc_ap.json, "secretary_bird.rp_ac .json" (note the space) and
warlus.json -- so nothing is lost by arming the checkout for these paths.

PATHS now covers every directory docker-compose.yml mounts, so a mount can no
longer point at a directory CI never delivers.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Gf1kZypRDfPL1YiWUS1LC
2026-08-28 13:23:48 +01:00

69 lines
2.6 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/**'
- 'dynamite-addon/**'
- 'hemp-addon/**'
- 'naturalist-lite-addon/**'
- 'smart-crafting-addon/**'
- 'tow-boat-addon/**'
- 'trees-features-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/ dynamite-addon/ hemp-addon/ naturalist-lite-addon/ smart-crafting-addon/ tow-boat-addon/ trees-features-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}}"