Files
minecraft-aiworld/.gitea/workflows/deploy.yml
SysAdmin 14dd6d5ce7 ci(deploy): include camping-supplies-addon in workflow sync
The camping-supplies addon was added to docker-compose.yml as a bind
mount but never added to the workflow's path filter or PATHS checkout
list, so the directory on the server stayed empty and the pack was
invisible to all four worlds.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 01:11:53 +01:00

56 lines
1.8 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/**'
- '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"
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/ 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}}"