All checks were successful
Deploy Addons / deploy (push) Successful in 14s
Villages now evolve organically as villager populations grow. The addon scans every 5 minutes, clusters villagers by proximity, and places new buildings (well, lamp post, houses, farm, blacksmith) adjacent to existing villages as population thresholds are reached. State is persisted across restarts via world dynamic properties. Deploys to jamie, lyla, mya survival worlds only. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
50 lines
1.6 KiB
YAML
50 lines
1.6 KiB
YAML
name: Deploy Addons
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'addon/**'
|
|
- 'lobby-addon/**'
|
|
- 'hub-return-addon/**'
|
|
- 'easter-egg-addon/**'
|
|
- 'village-evolution-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"
|
|
|
|
# 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 -- addon/ lobby-addon/ hub-return-addon/ easter-egg-addon/ village-evolution-addon/ docker-compose.yml
|
|
else
|
|
cd "$APP_DIR"
|
|
git fetch origin main
|
|
git checkout -f origin/main -- addon/ lobby-addon/ hub-return-addon/ easter-egg-addon/ village-evolution-addon/ docker-compose.yml
|
|
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}}"
|