name: Deploy c4 on: push: branches: [main] env: DEPLOY_DIR: /home/ryan/c4 jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Sync to deploy directory run: | mkdir -p $DEPLOY_DIR rsync -a --delete --exclude 'data/' . $DEPLOY_DIR/ - name: Ensure data directory exists with correct ownership run: | mkdir -p $DEPLOY_DIR/data # UID 5 / GID 60 = games:games in the container (debian:bookworm-slim) sudo chown 5:60 $DEPLOY_DIR/data - name: Rebuild and restart run: cd $DEPLOY_DIR && docker compose up -d --build --remove-orphans